[google-appengine] Re: key - RefrenceProperty

2009-03-24 Thread Paul Roy
your ReferenceProperty should be declared as: childname = db.ReferenceProperty(person) and then set as: childname = result i think :) Sent from my iPhone On 09-03-24, at 09:51, Steve W wrote: > > I am struggling with understanding how to use keys to enforce > reference between two tables.

[google-appengine] Re: key - RefrenceProperty

2009-03-24 Thread Steve W
I happened to catch that today while the post was being moderated. I updated the code to include that (person) and it still doesn't work. It seems as though childname=result ( and childname=result.key()) returns an in memory object, and not really the key id. doing a str(result.key()) after the

[google-appengine] Re: key - RefrenceProperty

2009-03-24 Thread Steve W
i figured it out.. The issue is the sequence after the result.put() followed by gParent. The childname result needs to be updated. The original code was creating a new entry every time for parentperson() instead of reusing the original .get(). The code below contains some goofy if nests, b