|Update fetching null relationships [message #1339131]
||Wed, 07 May 2014 14:34
| Mauro Flores
Registered: September 2009
Look at the following code, where Foo has a one to many lazy relationship whith boo.
1 - Foo foo = em.find(fooid);
2 - foo.setBoos(null);
3 - em.update(foo);
When em.update is executed (line 3), before the execution of UPDATE sql command, a SELECT on table BOO is performed.
It does not happen if I don't set null to boo relationship(line 2).
For some reason I need to set null before the update but I wouldn't like that boo relationship would be fetched(it's lazy).
Is there a eclipselink configuration to avoid this behaviour.
Powered by FUDForum
. Page generated in 0.01995 seconds