I am populating a database and I have these this model:
class Album(StructuredNode):
name = StringProperty(unique_index=False, required=True)
artist = StringProperty(unique_index=False, required=True)
slug = StringProperty(unique_index=True, required=True)
But for some reason when I try to populate my database, if I have two albums with the same name but different artists and slugs, I get this error:
File "/Users/datascientist/Desktop/populate.py", line 66, in <module>
album.save()
File "/Users/datascientist/anaconda/lib/python2.7/site-packages/neomodel/signals.py", line 25, in hooked
val = fn(self, *args, **kwargs)
File "/Users/datascientist/anaconda/lib/python2.7/site-packages/neomodel/core.py", line 159, in save
self._id = self.create(self.__properties__)[0]._id
File "/Users/datascientist/anaconda/lib/python2.7/site-packages/neomodel/core.py", line 289, in create
results = db.cypher_query(query, params)
File "/Users/datascientist/anaconda/lib/python2.7/site-packages/neomodel/util.py", line 216, in cypher_query
raise UniqueProperty(e.message)
neomodel.exception.UniqueProperty
How do I make it so the name parameter isn't unique?