Hey guys, sorry to bother you again, but i'm spending hours on this
problem and can't find the solution:

teknoid has this nice blog, where he describes his metode so save some
extra data to the HABTM table by binding them as hasMany.

http://teknoid.wordpress.com/2008/09/24/saving-extra-fields-in-the-join-table-for-habtm-models/


i have 3 tables:
users, Companies and CompaniesUser

my code looks like this:

$this->data['CompaniesUser'][0]['company_id'] = '99';
$this->data['CompaniesUser'][0]['status'] = 'disabled';


$this->User->bindModel(array('hasMany'=>array('CompaniesUser')));
$this->User->saveAll($this->data)

it saved the user correctly and it saves the company_id and the status
in the companiesUser table, but it didn't insert the user_id from the
new created user. any idea what i'm doing wrong?

thx for your help!
--~--~---------~--~----~------------~-------~--~----~
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