I will rephrase a bit.

As I said I have table Playlists and table Songs (this one has it's
own associations with Artists, Albums tables, etc.) that obviously got
HABTM
association (all tables are named properly, according to Cake
conventions).

Now, how do I retrieve all songs, with all the artist, album data,
that belong to a particular playlist?


On Oct 24, 2:26 pm, jayarjo <jaya...@gmail.com> wrote:
> Let's say I've got table Playlists and table Songs (this one has it's
> own associations with Artists, Albums, etc.) that obvously got HABTM
> association (all tables are named properly, according to Cake
> conventions).
>
> Now the question (probably it's very dumb, sorry :) I got HABTM
> association between Playlists and Songs, and only HABTM, is it enough
> to use $this->Song->find() method to find all songs that correspond to
> a specific playlist (I do provide all necessary conditions)?
>
> The problem is that having all that in place I see that cake doesn't
> join HABTM associated tables in this case. Do they have to have other
> associations to? hasOne? hasMany?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to