openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <>
Subject Re: detachment, getReference(), and openjpa.DetachState
Date Thu, 18 Jan 2007 02:27:37 GMT
On Jan 17, 2007, at 12:07 PM, Patrick Linskey wrote:

>>> The tests can be made to pass by setting the openjpa.DetachState
>>> property to 'fgs',
>> 'loaded' is the proper default.  If the CTS is relying on any state
>> being loaded after a call to getReference(), then those CTS
>> tests are
>> wrong and should be reported as such.  The description of
>> EntityManager.getReference explicitly states that state might be
>> lazily fetched and that you can't rely on the state being available
>> on detach unless you've accessed it.
> Yes, agreed. The tests have been challenged and are being removed from
> the CTS. Nonetheless, the behavior that the CTS relied on still seems
> valuable.
> I should have been more clear in my original email: I'm not trying to
> figure out how to pass the CTS test, but am wondering if we should be
> adding the loaded+fetchgroup option, since it seems useful.

I think we should ask our selves, what does a user expect to happen  
and make that the default.  If every JPA implements this with the  
loaded+fetchgroup style by default, and OpenJPA doesn't that would be  
quite surprising to users and will most likely result in a lot of  
lost hours in a debugger.


View raw message