db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bouschen <michael.bousc...@akquinet.de>
Subject Fwd: JPA 2.1's fetch plan support
Date Fri, 14 Jun 2013 16:23:54 GMT
Forward Email to jdo-dev.

Regards Michael

-------- Original-Nachricht --------
Betreff: 	JPA 2.1's fetch plan support
Datum: 	Thu, 13 Jun 2013 15:57:18 -0500
Von: 	Matthew Adams <matthew@matthewadams.me>
Antwort an: 	<jdo-user@db.apache.org>
An: 	<jdo-user@db.apache.org>

I've reviewed JPA 2.1's fetch plan support (I happen to be writing a JPA
course right now).  Quick synopsis (I'm pressed for time):

* Terminology:  JPA "EntityGraph" (EG) ~= JDO "FetchPlan"

* JPA EGs define graphs only

* They only apply to em.find(..) operations and queries, being given as hint

* Two kinds of hints:
   * "javax.persistence.fetchgraph" => *only* the attributes identified in
EG loaded; overrides any other fetching policies
   * "javax.persistence.loadgraph" =>guarantees that *at least* the
attributes identified in the EG; all other fetching policies apply
according to their user-specified values or JPA defaults

* EG definitions contain all attributes within the definition itself;
presents maintenance issue if you remove an attribute that was used in an EG

* Annotations are quite verbose:

* Can be specified in XML metadata (less verbosely)

* Can't specify graph depth, recursion or otherwise

* API form:  interface EntityGraph, etc

See JPA 2.1 specification, section 3.7, p.109 for more info.  I need to
review JDO's fetch plan support for comparison, as I don't remember some of
the details.


mailto:matthew@matthewadams.me <matthew@matthewadams.me>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message