[jboss-user] [EJB 3.0] - Re: eager vs. lazy fetching

eiben do-not-reply at jboss.com
Thu Feb 22 12:57:43 EST 2007


OK, thanx. So I got this thingy working.

But now I have something like this, which also gives me an error, that the items are not yet fetched ...


  | Itemgroup myItemGroup = getItemDispatcher().findItemGroup(Integer.parseInt(request.getParameter("id")));
  | 
  | Collection<Item> myig = myItemGroup.getItems();
  | 

and the ItemDispatcher does something like this:

  | @Stateless
  | public class ItemDispatcherBean implements IItemDispatcher
  | {
  | 	public Itemgroup findItemGroup(int id)
  | 	{
  | 		return em.find(Itemgroup.class, id);
  | 	}
  | //...
  | }
  | 

I think that's a little bit odd ... I thought this could be fetched "on-demand" ...

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

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



More information about the jboss-user mailing list