I have 2 tables, a info table and a lookup table. Connected to a postgres DB
class Lookup(models.Model):
lookup=models.CharField(max_length=50)
class Info(models.Model):
multiChoice = ArrayField(models.IntegerField(blank=True),null=True)
Can I create a referential constraint on the multiChoice field such that each value on the field must be one of the ID's of the Lookup table.
Something like this - http://blog.2ndquadrant.com/postgresql-9-3-development-array-element-foreign-keys/