-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
Description
Description
The new association alias FlowNodes is already set exception can break the baking of models. In my case, my table has two columns flow_node_id and flow_node_parent_id. Both are unrelated to CakePHP. How ever, it is not possible to bake a Model for this, because the bake command already throws the exception.
I dropped one column to resolve the issue, passing --no-associations would be another option, but I think the bake command should be less strict. It is expected that the auto generated code could contain potential errors and the exception should occoure on runtime, but not on generating the php code itself.
I think this behavior got implemented with CakePHP 5.1:
Adding associations with duplicate names will now raise exceptions.
CakePHP Version
5.2.8