エンタープライズRails
複合キーの必要性はなし?
ID or not ID
複合キー
でこの問題はCakeのほうではどうか、というと、何度かTicketが出ていて、パッチまで送られていますが不採用になっています。CakeもやはりRailsと同じ立場を取っていく、という表明ですね。
Allow using compound (multi-field) primary keys and foreign keys
https://trac.cakephp.org/ticket/834
Allow (SQL) DELETE for join tables and other multi-column primary keys
https://trac.cakephp.org/ticket/1237
allow multi-column primary keys (e.g. for join tables/habtm)
https://trac.cakephp.org/ticket/1293
Allow the definition of a primary key composed of more than one field
https://trac.cakephp.org/ticket/2811
今後もこの方針は変わらないと思いますが、オープンソースなので、自分で使いたいように変更する分には何の問題もありません。諸般の事情でどうしても複合キーを使いたい人は、作ってもよいのではないでしょうか。
ちなみにQcodoは複合キーをサポートしているフレームワークだと思います。(最近どうなっているかは調べていませんが……)
http://www.qcodo.com/




