Hi NickTheGreat,

First off, you are great to reply. Thanks so much. I was loosing faith :-).

Anyway, yes, I too have seen that calling the dummy method list.size() to 
initialize the collection works, however, my question is - why is this needed 
at all????

Anyway, if that is the fix everyone is using fair enough, but I have to say I 
think it's pretty awful. Surely when you do a call to --> u.getOrders(), eg:

{code}
public List getOrdersForUser(String userName)
{
User u = entityManager.find(User.class,userName);
// a check if a user with this name is actualy found wouldn't hurt
return = u.getOrders();
}
{code}

you would expect the collection to be accessed. 

Anyway, I think this will lead to loads of problems, but thanks very much 
indeed for your help.

cheers,
Binario



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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to