id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 9525 It should be possible to disable the creation of database key constraints in ForeignKey Field mohlendo nobody "I have the following model: {{{ class A(models.Model): """""" A alias_name of 'A' can have various name """""" name = models.CharField(max_length=50) alias_name = models.CharField(max_length=50) class B(models.Model): a = models.ForeignKey(A, related_name='bs', to_field='alias_name', db_column='a_name', create_constraint=False) user = models.ForeignKey(User, related_name='bs') }}} During syncdb the ForeignKey from A to B should not be created as a key constraint. Since B has a foreign key to the alias_name of A and one alias_name is mappend to various names, B gets all As with a specific alias_name. This is more or less a n-m relation without the extra table. See attached patch... " closed Database layer (models, ORM) dev wontfix Unreviewed 1 0 0 0 0 0