You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and didn't find my feature already requested there
Feature description
When dealing with one-to-many relationships the names of the fields on the 'one' side is currently using the Table's name. When you have multiple foreign keys with that table, an underscore is appended.
In the 'Lines' class the relationships are called point_a and point_b however on the Point's class, they are called Lines and Lines_, which makes it hard to understand. (This is example is not the best in terms of naming, but hopefully the issue is visible.)
Solution Proposal:
Include the either the FK or the back populates in the field name:
Lines->Lines_point_aLines_->Lines_point_b
Or something similar. This should only happen if there are multiple foreign keys are present for the same table.
Use case
Improves readability of the code, and makes more sense.
Might have to make it optional, as it might break existing code.
The text was updated successfully, but these errors were encountered:
Things to check first
Feature description
When dealing with one-to-many relationships the names of the fields on the 'one' side is currently using the Table's name. When you have multiple foreign keys with that table, an underscore is appended.
Example:
In the 'Lines' class the relationships are called
point_a
andpoint_b
however on the Point's class, they are calledLines
andLines_
, which makes it hard to understand. (This is example is not the best in terms of naming, but hopefully the issue is visible.)Solution Proposal:
Include the either the FK or the back populates in the field name:
Or something similar. This should only happen if there are multiple foreign keys are present for the same table.
Use case
Improves readability of the code, and makes more sense.
Might have to make it optional, as it might break existing code.
The text was updated successfully, but these errors were encountered: