Automatic ManyToMany Fields in models defined in packages use invalid column names
|Reported by:||ldevesine||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Using an M2M field in a model that is defined in a models package (that is, in member.models.membership where member is an app and app_label is defined as 'member' in the models) tries to access invalid column names to retrieve data.
In member.models.membership I have defined a MembershipType with a ManyToManyField subscriptions on SubscriptionType, defined in the same file. When I attempt to access this M2M relationship, I get the error:
"Unknown column 'membership_type_subscriptions.member.subscriptiontype_id' in 'field list'"
This bug appears only in the SVN version.