Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Marshalling objects with Lazy Joins in MOxy(Marshalling objects with Lazy Joins in MOxy)
Marshalling objects with Lazy Joins in MOxy [message #897566] Tue, 24 July 2012 10:09 Go to next message
John Dugo is currently offline John Dugo
Messages: 13
Registered: October 2011
Junior Member
I having some problems with LAZY OneToOne and ManyToOne joins in moxy. When marshalling the Entity Objects with lazy joins, the joined objects are only sent across if the Lazy Join has been instantiated. This isn't a problem with OneToMany joins.

As a workaround, I have to manually invoke the Lazy getters before I marshall the entities, however this is cumbersome. Is the a way I can avoid doing this?

We are using MOxy only for our testing framework, which is why we want to lazy joins to always be invoked. But in production we still want to have the performance advantage of using LAZY initialization. (if you are wondering why we dont just switch to using EAGER)

[Updated on: Tue, 24 July 2012 10:22]

Report message to a moderator

Re: Marshalling objects with Lazy Joins in MOxy [message #898568 is a reply to message #897566] Thu, 26 July 2012 11:44 Go to previous message
Blaise Doughan is currently offline Blaise Doughan
Messages: 163
Registered: July 2009
Senior Member

Hello,

As long as your are mapping to the properties (get/set methods), and have not specified @XmlAccessorType(XmlAccessType.FIELD) then all the mapped relationships should be triggered for you during the marshal operation.

-Blaise
Previous Topic:Problem with 2.4 and Sybase drivers
Next Topic:JDBC and VFP
Goto Forum:
  


Current Time: Wed Apr 23 17:45:02 EDT 2014

Powered by FUDForum. Page generated in 0.17765 seconds