Re: [appengine-java] can't retreive one-to-may objetcs, JPA

2011-01-18 Thread Stephen Johnson
What I mean is that before you close the entity manager you would need to loop through your list and call the getSubjects() accessor method to cause the entity manager to load the subjects. I am not a JPA developer but I did a quick google search on JPA and it seems that indeed the default fetch op

Re: [appengine-java] can't retreive one-to-may objetcs, JPA

2011-01-18 Thread Cesar Ruiz
What do you mean by "need to access to the subjects field before closing the em?". Do you mean, with the em, retreive the list of subjects and the add them to the list of books?. (That's a workaround, but it is not efficient), It's supposed to retreive the books completly with their subjetcs also,

Re: [appengine-java] can't retreive one-to-may objetcs, JPA

2011-01-17 Thread Stephen Johnson
I don't do JPA, but If it's like JDO and you have lazy loading then don't you need to access the subjects field before you close your entity manager to get the subjects loaded? Just a thought. On Mon, Jan 17, 2011 at 3:51 PM, kidowell wrote: > I cannot retreive the List from book. The save and u

[appengine-java] can't retreive one-to-may objetcs, JPA

2011-01-17 Thread kidowell
I cannot retreive the List from book. The save and update of a book when a subject changes its fine, the problem is when retreiving books, It doeesnt retreive their subjects. I need help. Here;s the code. @Entity @Table(name = "book") public class Book implements Serializable, IsSerializable {