Hello to all.

I would like to share with you a problem I'm having and I need your
suggestions.


We have the following models:

Video, Album, Artist.

Video and Album are not relationed using HABTM; but Video hasMany
AlbumVideo; AlbumVideo hasMany Albums.

AlbumVideo has an Order field to sort them all.


Now I would like to search in Album and song title.

I've tried Video->unbindModel(AlbumVideo) and then Video->bindModel->(HABTM
=> Album => joinTable album_videos) ; but Videos and Albums are not
LeftJoined.

Then I've done:

            $Videos = $this->Video->Album->findAll(array('Video.track_title
= \'PATO\'' , 'Album.title = \'CANTINA\''),
                                            array(),
                                            array(),
                                            NULL,
                                            NULL,
                                            $Recursive);


And switched $Recursive between 0, 1, 2, 3, 99... but it says always some
fields are inexistent.



Will I need to write SQL manually? Any suggestion or example?


Thanks in advance!



n.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to