Re: HABTM Relationship, conditions based on the join table

2007-06-07 Thread AD7six
On Jun 6, 12:46 pm, jameslagan <[EMAIL PROTECTED]> wrote: > If I try and use: > > $this->Badsession->recursive = 1; > $this->Badsession->findAll(); > > this runs 2 queries: > > SELECT `Badsession`.`id`, `Badsession`.`date`, > `Badsession`.`timestart`, `Badsession`.`timeend`, > `Badsession`.`ven

HABTM Relationship, conditions based on the join table

2007-06-06 Thread jameslagan
Dear CakePHPers, I run a badminton club and any badsession can have any user and any user can take part in any badsession. Hence a HABTM relationship. I have a HABTM as follows: badsessions <-> badsessions_users <-> users In the badsessions model I have: var $hasAndBelongsToMany = array(