Hello,

I'm not sure what are you trying to achieve with 'anonymous'
reference, but that error happened because both ref1 and ref2 has the
same "implicit collection property on the referenced class" called
"foofoo_set" (<name-of-class>_set)

Maybe you can set each of them to have different name using
collection_name parameter when you declare the model's property.

For more about this subject you can read:
http://code.google.com/appengine/articles/modeling.html

On Aug 28, 6:10 am, djidjadji <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Here is a nice DuplicatePropertyError.
>
> My object FooFoo has 2 'anonymous' (reference_class=None)  
> db.ReferenceProperty
>
> class FooFoo(db.Model):
>   ref1 = db.ReferenceProperty(required=True)
>   ref2 = db.ReferenceProperty(required=True)
>   num1 = db.IntegerProperty(required=True)
>   num2 = db.IntegerProperty(required=True)
>
> When I run a program with this class I get the following error
>
> <class 'google.appengine.ext.db.DuplicatePropertyError'>: Class Model
> already has property foofoo_set
>
> At the second run, a reload of the page, the foofoo_set text is for
> another class.
> I have to shutdown the development server and restart (version 1.1.1).
> He can't resolve after this error.
>
> When I remove 1, the program runs.
> If I make both db.ReferenceProperty pointing to a class the program will run.
> But I want 'anonymous' db.ReferenceProperty.
>
> Why do I get the error? And why for the Class "Model"?
>
> What is the use of the parameter 'verbose_name' in the constructor?
> The manual says nothing about it.
> class ReferenceProperty(reference_class=None, verbose_name=None,
> collection_name=None, ...)
>
> Djidjadji
--~--~---------~--~----~------------~-------~--~----~
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