I finally figured it out or at least one way of doing it.
Step 1 - Unbind the HABTM with the Associate model
Step 2 - Save User model data
Step 3 - bind HABTM with Associate model
Step 4 - save data['User']['id'] = getLastInsertID <- for the
automagic to happen!!!
Step 5 - Save Associate data
T
What is the "with" option?
On Jul 2, 1:30 pm, francky06l <[EMAIL PROTECTED]> wrote:
> If you use a join model (ie: HABTM) using 'with' option, the saveAll
> will work if you also save the Associate (saving User, Associate and
> the with Model).
> If you do not have the Associate to save, just unb
If you use a join model (ie: HABTM) using 'with' option, the saveAll
will work if you also save the Associate (saving User, Associate and
the with Model).
If you do not have the Associate to save, just unbind and bind as
hasMany your liked model (the with), and call saveAll...
hth
On Jul 2, 6:28
It's best to just make a model for your join table, populate it
manually and save it separately. There is an "automagic" way to do it
- which is described in the manual - but it's just as much work and
not very intuitive. The way the automagic works is you have to add an
array of Associate keys yo
Hello All,
I'm stuck and need a jump start here. I have a form that collections
User model and Associate model data. User like email, password and
Associate like street, city, state, etc... data. I have a HABTM
relationship between User and Associate. My question is how to make
the linkage w