[appengine-java] Re: Unowned relationships using aliases

2010-05-01 Thread Sudhir Ramanandi
Can any one help me.. On Fri, Apr 30, 2010 at 10:46 PM, Sudhir Ramanandi sramana...@gmail.comwrote: I tried to implement unowned one to many relationship using column alias as explained here http://gae-java-persistence.blogspot.com/2010/02/truth-about-joins.html Here's my code @Entity

[appengine-java] Re: Unowned relationships

2009-09-03 Thread funkforce
Jason: good point and yes the code did work Leszek: good point! Thanks all for the help. On Sep 3, 9:27 am, leszek leszek.ptokar...@gmail.com wrote: Keep also in mind that it is not enough to convert 'Child' to 'Key' while persisting 'Parent'. You should also set key to Parent in Child,

[appengine-java] Re: Unowned relationships

2009-09-02 Thread Jason (Google)
I haven't tested this, but I believe this should work, yes. Let me know if/when you try it. As an aside, the object you return here won't actually be detached since you're not using transactions (and hence, not committing). You'll want to use something like the following or use a transaction.

[appengine-java] Re: Unowned relationships

2009-09-01 Thread leszek
You can follow something like that class Parent { @Persistent private ListLong/Key childList; // non Persistent private ListChild list; ... } class Child { @PrimaryKey private Long/Key key; ... } // before save Parent private void beforeSave(EntityManager

[appengine-java] Re: Unowned relationships

2009-09-01 Thread funkforce
Hi, First of all, thanks for posting, it really helps me. objectuser : Good post and the link was really nice. Albert Attard : Thanks for the examples, it shows that you have to wright lots of code to manage your own relationships (which I was trying to avoid). leszek: This is what I did and

[appengine-java] Re: Unowned relationships

2009-08-31 Thread Albert Attard
Hi: Quote from the page: http://code.google.com/appengine/docs/java/datastore/relationships.html#Unowned_Relationships The App Engine implementation of JDO does not yet implement this facility, but don't worry, you can still manage these relationships using Key values in place of instances (or

[appengine-java] Re: Unowned relationships

2009-08-31 Thread funkforce
Hi, No it doesnt really help me. I understand that I have to manage the relationships myself but I cant really get it working. So an example would be nice. Thanks FF On Aug 31, 5:31 pm, Albert Attard albertatt...@gmail.com wrote: Hi: Quote from the