|Re: Set null causes the loading of the relationship [message #660811 is a reply to message #659078]
||Mon, 21 March 2011 17:14
| James Sutherland
Registered: July 2009
Location: Ottawa, Canada
If you read the objects using a read-only query, then they will not track changes (but you also must not change them). You could also set "eclipselink.maintain-cache" to false on a query, this would return detached objects.|
You could also create a copy of the managed object using the JpaEntityManager copy() API.
How did you detach the object? If they were copied or serialized, then they will not query the old value. If they were read from another EntityManager, then they are probably still attached to it. Technically if you closed the EntityManager, EclipseLink could be smart enough to disable change tracking, but that is not currently done, you could log a bug for that if you wish.
James : Wiki : Book : Blog : Twitter
Powered by FUDForum
. Page generated in 0.01626 seconds