Re: Some doubts regarding associations in CakePHP
did you try it?
and yes, you should always prefix field names to avoid collisions.
On 16 Jan., 11:04, Angad Nadkarni <angad.nadka...@gmail.com> wrote:
> Hi I've got a couple of questions regarding associations and how they play in cases
> of complex find() calls.
>
> If I've got a model Post and a model Comment with the latter having a parent_id field and I want to fetch a post with its associated comments threaded, do I simply perform a find('threaded', ...) on Post itself or will this result in an error because Post doesn't have a parent_id? I am particularly concerned about a Containable + Threaded find. (the example I give here is a simplified version of what I actually need to implement)
> What is the significance of Association Names? Does Containable work on association names or model names? If I am having find conditions referring to an associated model (e.g. 'Post.id'), do I suffix field names with the model name or association name?
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home