Re: [appengine-java] Setting the key of a child entity

2010-02-18 Thread Manny S
Got it. Thanks again Ikai. Manny On Thu, Feb 18, 2010 at 12:16 AM, Ikai L (Google) wrote: > There should be with KeyFactory's builder, but you may not want to go > there: > > > http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.Builder.html > > > On

Re: [appengine-java] Setting the key of a child entity

2010-02-17 Thread Ikai L (Google)
There should be with KeyFactory's builder, but you may not want to go there: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.Builder.html On Sun, Feb 14, 2010 at 10:16 PM, Manny S wrote: > Thanks Ikai, > I am doing it the way you described and it

Re: [appengine-java] Setting the key of a child entity

2010-02-14 Thread Manny S
Thanks Ikai, I am doing it the way you described and it does work. Just wanted to know if there is a way to set the child key explicitly as parent + "const string". But I understood that will not work with datastore generated keys since the parent needs to be persisted in order to get a key. Apolog

Re: [appengine-java] Setting the key of a child entity

2010-02-11 Thread Ikai L (Google)
Are both the parent and child persisted at the same time? If so, you can add the child object as a child (not the Key) of the Parent object and call makePersistent on the Parent. On Thu, Feb 4, 2010 at 1:28 AM, Manny S wrote: > I am missing something simple here but can anyone point me to how I

[appengine-java] Setting the key of a child entity

2010-02-04 Thread Manny S
I am missing something simple here but can anyone point me to how I can set the child key before making the parent data persistent...(in a unidirectional one to one relationship) I create the parent data and the child data parentdata pdata = new parentdata('x','y', 'z'); pdata.setKey(null); child