Why doesn't CakePHP support multi-column foreign key?
I have searched google for this with no good result. The only thread I found in the CakePHP trac has been closed with no "real" explanation. Since CakePHP is like one of the rails ports for php and rails supports this, I would like to know why it does not support this feature.
OK. but I would like to work out how my db schema will be, in RoR you have a tool, if you want to use it, you do it at your own risk. By the way: I don't know if the symphony permits this.
source to share
Only the CakePHP team knows for sure. One of the teams, Nate Abdele, reported this about multi-column primary keys back in February 2007:
I could find a million other reasons why multi-column primary keys are a dumb idea, but I think the most important thing for 2007 is that it breaks down the REST architecture on the internet since there is no single point of reference to a piece of data, and that the data can now change on you without you knowing it, so objects can no longer be referenced by the same URI.
I guess this would be his argument against multi-column outer columns.
source to share
No, the real reason to support multi-column primary keys is to install CakePHP into an existing application. Don't encourage this type of practice because it's bad design, of course, but if you had the choice of using multiple primary keys and redesigning a large chunk of your existing administration system, a simple choice would be a very nice feature.
source to share