Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Update fetching null relationships
Update fetching null relationships [message #1339131] Wed, 07 May 2014 14:34
Mauro Flores is currently offline Mauro FloresFriend
Messages: 84
Registered: September 2009
Location: Brasil

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.

Regards. Mauro.

Previous Topic:Problems with JAXB and Moxy
Next Topic:Native Query, ScrollableCursor, Join Fetching, and Duplicate Column Names
Goto Forum:

Current Time: Sun May 27 16:00:20 GMT 2018

Powered by FUDForum. Page generated in 0.01255 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top