Re: [appengine-java] Re: Probably a newbie question (most likely)

2011-02-23 Thread Fernando O.
Actually I had to persist the user :D But I found another problem: The Key for the Thread is a Long... Appengine is generating dupes for that key even though it's the pk. It loooks like it realizes that a Thread is owned by a user and in the DB it ends with a PK The weird part is that the commen

[appengine-java] Re: Probably a newbie question (most likely)

2011-02-23 Thread WillSpecht
Check out this blog post: http://gae-java-persistence.blogspot.com/2009/10/creating-bidrectional-owned-one-to-many.html I'm pretty sure you want to be persisting the thread and not the comment. If you make it un-owned, you want the thread to have a key and a user, then each comment has a key and

Re: [appengine-java] Re: Probably a newbie question (most likely)

2011-02-22 Thread Fernando O.
tried that and it's telling me org.datanucleus.exceptions.NucleusObjectNotFoundException: Could not retrieve entity of kind Thread with key Thread(51) I also tried doing a query with the Thread key and UserKey (wich is the key for a thread) and then I get an exception about modifying 2 entities in

Re: [appengine-java] Re: Probably a newbie question (most likely)

2011-02-22 Thread Fernando O.
Thanks! I'll try that. BTW no, addComment does not store the comment. On Tue, Feb 22, 2011 at 8:49 PM, WillSpecht wrote: > Don't you need to persist the thread as well as the comment? It's > hard to analyze your code with such a small sample. Does addComment > persist the thread? My > guess i

[appengine-java] Re: Probably a newbie question (most likely)

2011-02-22 Thread WillSpecht
Don't you need to persist the thread as well as the comment? It's hard to analyze your code with such a small sample. Does addComment persist the thread? My guess is that something is making the transaction fail, probably cause you are trying to operate on two different entity groups. I would si