[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [eclipselink-users] Specification interpretation question | 
Hello Laird,
No, lazy loading is done when reading from the database, not creating 
new objects.  It requires that the foreign key value be known when 
building the object, which although the e1Id attribute is set, there is 
no EclipseLink mechanism to equate the e1ID attribute to the foreign key 
value used to bring in the e1 relationship - they are independent 
mappings that happen to use the same database field. 
Regards,
Chris
Laird Nelson wrote:
On Tue, Aug 18, 2009 at 2:19 PM, christopher delahunt 
<christopher.delahunt@xxxxxxxxxx 
<mailto:christopher.delahunt@xxxxxxxxxx>> wrote:
    e2.getE1() will return null until e2 gets refreshed from the
    database (following a flush/commit), or it is set by the
    application directly.  JPA does not provide relationship
    maintenance, and determining that the  relationship changed/exists
    because a basic mapping changed is an extreme form of relationship
    maintenance.   Doing so would be provider specific, and not is
    implemented by EclipseLink (though you could set it to occur with
    events or change listeners).
    Best Regards,
    Chris
Thanks.  I was under the impression that this would fall under the 
umbrella of lazy loading, not relationship management?  That is, the 
merge() would create a new object, and copy the state of the new 
object on top of it, and since I'm using the new, merged object when I 
next called getE1() it would trigger the lazy load mechanism?  No?
Best,
Laird
------------------------------------------------------------------------
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users