> > Cake does *not support* multi-field primray keys, please read the > hasManyBelongsToMany section of the model documentation > http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasandbelongstomany-habtm >
True, except that Sam Clauw is not using HABTM, but a "HABTM Alternative" or "HasMany Through" (http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasmany-through-the-join-model) which does need a single field PK. On Tuesday, 25 February 2014 08:38:58 UTC+2, wilderland wrote: > > Hi, > > This are not bugs, this are features. The inflector only > pluralizes/singularizes the last word of the table. Also the other point is > not an issue. Cake does *not support* multi-field primray keys, please > read the hasManyBelongsToMany section of the model documentation > http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasandbelongstomany-habtm<http://www.google.com/url?q=http%3A%2F%2Fbook.cakephp.org%2F2.0%2Fen%2Fmodels%2Fassociations-linking-models-together.html%23hasandbelongstomany-habtm&sa=D&sntz=1&usg=AFQjCNGIq1rVipv8XzuBooXchRUIOv1g1w>. > In the way Cake handls updates and deletes a multi-field primary key will > make more problem than will help. With a unique key on both columns and > autoincrement PK's you can reach the same goal. > > I hope that will help you. > > > Am Dienstag, 25. Februar 2014 05:11:50 UTC+1 schrieb Dakota: >> >> In multi barrelled names (like AccessibilityAttraction) the Cake >> inflector only pluralizes/singularizes the last word. Easiest change would >> be to rename the model to AccessibilitiesAttraction. >> >> Another issue I noticed, Cake does not currently support multi-field >> primary keys. So in your AccessibilitiesAttraction table you should add a >> separate id field as the pk. >> > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
