Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Incomplete
-
Affects Version/s: 1.0.14, 1.1.6, 1.2.0
-
Fix Version/s: None
-
Component/s: Import/Export, Relations
-
Labels:None
-
Environment:sfDoctrinePlugin - inside symfony framework
Description
The columns in a table preserve the order in which they are defined - which is deterministic.
However, the relations can not only be defined in the schema file as part of the table definition, but can also "come from" other models. This causes sometimes that model files generated at different times have a different ordering of the same set of relations, which can confuse eg. version tracking software.
I propose that the order of relations be sorted, eg. by the key of the relation name. Thus, only significant changes (like renaming a relation, adding and dropping one) would affect the form of the base model class.
BTW. A simmilar problem arises with generated DDL - when changing relative ordering of unchanged tables. I know, that would have to be combined with topological sorting of foreign key dependencies between tables.
I submit a microscopic patch to address this shortcoming.
Issue Links
- depends on
-
DC-535
Fixtures loaded in the wrong order
-