views:

60

answers:

2

the next code is error:

class Thread(db.Model):
  members = db.StringListProperty(unique =True)

thanks

+3  A: 

There is no unique parameter for the constructor of a property. This is why your code crashes.

There is unfortunately no built-in mechanism on the datastore level. You will need to implement that in your code.

Emilien
+1  A: 

You can make a single property unique to a kind and entity group by making it the entity's key_name. The datastore will not enforce uniqueness for you in any other way.

Wooble
This would mean that the value of that property could NEVER change. In this "Thread" example, I imagine the "members" would eventually change?
Emilien