Hi Shay! Did you try to use ReferenceProperty?
transaction = db.ReferenceProperty(Transaction) Best Regards, Jesaja Everling On Mon, Dec 22, 2008 at 11:09 PM, Shay Ben Dov <[email protected]> wrote: > > Hi this is the issue > > I have a Transaction model > > I do: > transaction=Transaction(....) > transaction.put() > > tr_key = str(transaction.key()) > > I want to store it in a second mode > > class Tag(db.Model): > > transaction = db.Key(encoded=None) > tag = db.StringProperty(required=True) > user = db.UserProperty(required=True) > > I do: > > tag = Tag(transaction=tr_key,....) > tag.put() > > later on in the application I retrieve the tag entity and I want to > get the transaction back > > I do: > tr_key = tag.transaction > transaction = Transaction.get(tr_key) > > and I get an error message: > BadKeyError: Key datastore_types.Key.from_path(_app=u'') is not > complete. > > Every help or example is very appreciated. > > Thanks, > > Shay > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
