Very simple senario:
class User(Persistent):
def __init__(self, username, email):
self.username = username
self.email = email
I want to store the User instances in zodb by its username while keeping email unique.
u1 = User(username="u1",email="u1@example.com")
zodb_container[u1.username] = u1
I use the username as key to store this object, so it will be unique. My question is how to keep the email attribute unique? Is there any elegant way to do this in an object database?