openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abe White <>
Subject MaxFetchDepth default
Date Mon, 25 Sep 2006 18:55:13 GMT

This JIRA issue highlights a potential usability issue in OpenJPA.   
We have a default MaxFetchDepth of 1 currently, which means that if  
object A has an eager relation to B, which has an eager relation to  
C, fetching A will also fetch B, but won't fetch C.  This may not be  
what users expect, particularly in cases of detachment of  
bidirectional relations.  If A has a relation to B, and B has the  
inverse relation (with appropriate use of "mappedBy") back to A, a  
MaxFetchDepth of 1 means that in the detached graph, A.b will be  
loaded, but B.a will be null.

So what do you all think the default should be?  Leave it at 1?   
Change it to 2 to handle bidirectional relations?  Change it to  
unlimited depth by default?  Change it to some other number we deem  
reasonable for most users?  Please comment on the JIRA issue.

>>Register now for BEA World 2006 --- See<<
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

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