First some model code:

class SomeUserClass(db.Model):
    someId = db.StringProperty(required=True)

class SomeReferenceClass(db.Model):
    origin = db.ReferenceProperty(SomeUserClass,
collection_name='originSet', required=True)
    target = db.ReferenceProperty(SomeUserClass,
collection_name='targetSet', required=True)

According to the docs, there should be 2 implicit sets (originSet and
targetSet) on the SomeUserClass.  When I instantiate an instance of
SomeUserClass and try to access originSet or targetSet I am always
returned an empty result set.  I can query SomeReferenceClass using
GQL and I receive results so I know they are in there.  Example query:

a = SomeUserClass().get('someIdOfAUser')
res = SomeUserClass.gql('WHERE origin = :1', a.key())

The query returns result but the originSet and targetSet do not.  Is
this a bug, am I missing something or can you not have 2
db.ReferenceProperties pointing to the same class?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to