Hi Joseph, >From the docs: "If you have multiple ReferenceProperty values that refer to the same model class, the default construction of the back-reference property will raise an error [...] To avoid this error, you must explicitly set the collection_name argument" So i think you have to write:
class PartyRelationship(polymodel.PolyModel): to_party = db.ReferenceProperty(Party, collection_name="to_party_reference_one_set") from_party = db.ReferenceProperty(Party, collection_name="from_party_reference_one_set") Hope it helps, Have a nice weekend On Sat, Apr 11, 2009 at 4:08 PM, Joseph Benjamin R. Ilagan <joben.ila...@seer-technologies.com> wrote: > > I have the following code yielding a DuplicatePropertyError: > > class Party(polymodel.PolyModel): > creation_date = db.DateTimeProperty() > > class PartyRelationship(polymodel.PolyModel): > to_party = db.ReferenceProperty(Party) > from_party = db.ReferenceProperty(Party) > > class Person(Party): > first_name = db.StringProperty() > last_name = db.StringProperty() > middle_name = db.StringProperty() > > class Organization(Party): > name = db.StringProperty() > > The details of the error are as follows: > > DuplicatePropertyError: Class Party already has property > partyrelationship_set > > I have the "intersecting" Entity/Model referencing Party twice, but > each for different reasons. > > If this is a known limitation, are there any suggestions on how to go > around this (without having to create intersecting Models for the > various Party subclass combos)? > > Thanks. > > > > -- Quarix framework developer --- Ajax on Progress www.quarix.net http://blogspot.tudorconstantin.com http://www.linkedin.com/in/tudorconstantin Henny Youngman - "I told the doctor I broke my leg in two places. He told me to quit going to those places." - http://www.brainyquote.com/quotes/authors/h/henny_youngman.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---