[jboss-user] [EJB 3.0] - Re: Eager fetching missing an element when retrieved remotel

Wolfgang Knauf do-not-reply at jboss.com
Thu Jan 29 17:11:06 EST 2009


Hi,

I would not recommend usage of FetchType.EAGER in a many-to-many relationship, because on loading one parent, it might happen that half of the database is loaded, if fetching cascades from parent to childs to other parents to other childs and so on ;-).
Better use LAZY and provide some methods in the session bean to fetch the parents of the children of a parent.

Best regards

Wolfgang

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205690#4205690

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205690



More information about the jboss-user mailing list