How to do a back-reference on Google AppEngine?

Posted by jCuga on Stack Overflow See other posts from Stack Overflow or by jCuga
Published on 2010-06-03T17:15:07Z Indexed on 2010/06/03 17:44 UTC
Read the original article Hit count: 131

Filed under:
|
|

I'm trying to access an object that is linked to by a db.ReferenceProperty in Google app engine. Here's the model's code:

class InquiryQuestion(db.Model):
    inquiry_ref = db.ReferenceProperty(reference_class=GiftInquiry, required=True, collection_name="inquiry_ref")

And I am trying to access it in the following way:

linkedObject = question.inquiry_ref

and then

linkedKey = linkedObject.key

but it's not working. Can anyone please help?

© Stack Overflow or respective owner

Related posts about python

Related posts about google-app-engine