Oh, i didn't read that condition: array('Employee.is_supervisor'=>true)
You might want to add another model for the supervisors too, and change that relationship to call it. Then put another HABTM in the supervisors model pointing to the employees. Werner Petry Moraes http://werner.inf.br/ On Mon, Sep 22, 2008 at 3:40 PM, Werner Petry Moraes <[EMAIL PROTECTED]> wrote: > Hi, > > This is a HABTM relationship. > > Take all that off and use only this. > > var $hasAndBelongsToMany = array( > 'Supervisor' => array('className' => 'Employee', > 'joinTable' => > 'employees_supervisors', > 'foreignKey' => 'employee_id', > 'associationForeignKey' => > 'supervisor_id', > 'unique' => true > ) > ); > >> My problem right now is that when the joins occur it joins >> "Employee"."id" = "Supervisor"."id" when what I want is >> "Employee"."id" = "Supervisor"."employee_id" and/or "Employee"."id" = >> "Supervisor"."supervisor_id". >> >> I tried the associationForeignKey but I think that only works with >> HABTM relationships. > > > Werner Petry Moraes > http://werner.inf.br/ > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---