[jboss-user] [EJB 3.0] - Re: ManyToMany bidirectional - inverse side does not load the complete collection

Wolfgang Knauf do-not-reply at jboss.com
Tue Oct 5 03:38:56 EDT 2010


Wolfgang Knauf [http://community.jboss.org/people/WolfgangKnauf] created the discussion

"Re: ManyToMany bidirectional - inverse side does not load the complete collection"

To view the discussion, visit: http://community.jboss.org/message/564775#564775

--------------------------------------------------------------
Hi Nicole,

to my understanding, using "FetchType=EAGER" on both sides is a bit dangerous, because loading an "Appointment" entity would load all related "Offers", and loading those "Offers" would trigger a loading of "Appointments" and so on.
So I assume that Hibernate somehow detects this cycle and stops loading data.

Better use FetchType = LAZY with ManyToMany relationships.

You might also switch on SQL logging and take a look at the statements. Maybe you will find a hint there.

Hope this helps

Wolfgang
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/564775#564775]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101005/bbbda4c7/attachment-0001.html 


More information about the jboss-user mailing list