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.
Change History (10)
comment:1 Changed 6 years ago by ldevesine
- Component changed from Uncategorized to Database layer (models, ORM)
Changed 6 years ago by ramiro
comment:3 Changed 6 years ago by ramiro
- Resolution set to worksforme
- Status changed from new to closed
Changed 6 years ago by ldevesine
comment:4 Changed 6 years ago by ldevesine
- Resolution worksforme deleted
- Status changed from closed to reopened