Hi John, > I think I read somewhere (here in the group) that you need to include > the foreign keys in the fields definition, so containable can see > them! I read contain automatically also includes the foreign keys in it's sql-query.
http://book.cakephp.org/view/474/Containable : "As you can see, the Comment arrays only contain the author field (plus the post_id which is needed by CakePHP to map the results)." CakePHP does this - but strangely it does not inlcude C.A_id. All other foreign keys are included. I just checked if the hasMany and belongsTo relations in my models are correct: C HasMany(array(A,B)); C belongsTo(D); even if I include C.A_id in the "fields"-option the "where A.id = C.id" stays wrong. Any more ideas? Melanie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---