cakephp / bake

The Bake Command Plugin
Other
110 stars 100 forks source link

3.next - Fix unique constraints getting lost. #967

Closed ndm2 closed 8 months ago

ndm2 commented 9 months ago

When using the first column of the constraints and foreign keys to index the rules array, constraints and foreign keys that share the same first column in the composite constraint will overwrite previously set rules.

Now that is kind of a breaking change for people that are using custom table templates and/or custom model commands, but I don't really see a good way to fix this in a backwards compatible manner without awkward workarounds that will eventually still have pitfalls. Maybe this should rather go in a not yet existent 3.next?

Ideally there would be support for multiple error fields, as setting the error on the first field only is kinda awkward. Any opinions on that?

refs #957

othercorey commented 8 months ago

3.next does make sense for this and some other feature PRs