Re: CakePHP 2 - HABTM saving issue

2011-08-27 Thread Ben McClure
Figured it out myself... maybe I should give myself a 24-hour rule from the time I write my post to the time I actually post it :) Anyway, to get model deleting to work I set the 'dependent' property to True in the User model's hasMany relationship for AuthSourcesUser, and my array to save it l

Re: CakePHP 2 - HABTM saving issue

2011-08-27 Thread Ben McClure
Ok, I'm getting a little closer. Some digging in more documentation brought me to this array to use instead: Array ( [User] => Array ( [email] => (my email here) [first_name] => Ben [last_name] => McClure ) [AuthSource] => Array

Re: CakePHP 2 - HABTM saving issue

2011-08-27 Thread Ben McClure
Well, I realized as soon as I posted that the reason the auth_sources_users records aren't getting deleted is that their user_id fields are blank... so I don't know if there's going to be a problem deleting the records or not... But what am I doing wrong when saving the data using the manually-c

CakePHP 2 - HABTM saving issue

2011-08-27 Thread Ben McClure
I have a 'users' table, an 'auth_sources' table, and an 'auth_sources_users' table to join them. I added an extra field, 'unique_value' to the auth_sources_users table which stores a unique value to identify that user against the chosen auth source. In my User model, I have this: var $hasMany