removed unique together statement that forced the eav to act like a dict, now the eav acts like a multi-valued dict. This is useful for my use case where a family (a single entity) may have multiple children (multiple values for the same attribute).

This commit is contained in:
Andrew Marder 2010-11-02 09:13:24 -04:00
parent 1b67380d0e
commit b608a0ae6d

View file

@ -334,10 +334,6 @@ class Value(models.Model):
<Value: crazy_dev_user - Favorite Drink: "red bull">
'''
class Meta:
unique_together = ('entity_ct', 'entity_id', 'attribute')
entity_ct = models.ForeignKey(ContentType, related_name='value_entities')
entity_id = models.IntegerField()
entity = generic.GenericForeignKey(ct_field='entity_ct',