> How can i load an article, with ALL the pieces, even if they haven't a > 
> relationship, using Cake's find function?

You can't do this with one find query, this is not a limitation of
CakePHP you simply can't do one database call that will find one
article and all pieces related or not.
> This will not solve my issue. i want to load all the Pieces, even if
> they're not related to the Article Model

$this->Piece->find('all'); or $this->Piece->find('list'); if
populating an array to then be used as options in a form.

@Giorgio: Why should the tables be linked by HABTM? How do you then
accurately save and work with the extra fields Ernesto wants in that
table?

HABTM is just a convenience wrapper for the associations Ernesto laid
out in his original post, as soon as you want to start doing extra
stuff with the join table it;s a good idea to modelise it.

HTH, Paul.

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to