This content has been marked as final. Show 3 replies
You could use normal indirection, or use JPA with weaving. Proxy indirection it not normally used.
You could catch the error, or check for the proxy cast to ProxyIndirectionHandler and get the valueHolder's value from it to check if it is null.
Normally you would not get a proxy on null in a normal 1-1 mapping as the foreign key will be null, so EclipseLink will not build the proxy. Perhaps ensure your mapping uses a foreign key.
James : http://www.eclipse.org/eclipselink/
You're right. Even though this is not th normal use, it fits our situation.
For now I've found the following work around :
I call the equals method on null, which has been overriden in the ProxyHandler. But it triggers the loading of the reference.
Edited by: krampstudio on Nov 25, 2011 5:41 AM
Edited by: krampstudio on Nov 25, 2011 5:42 AM