Don't think that there's an easy way to do this, but if you have
another unique value field in the table, you could use the solution
mentioned here...

http://cakephp.1045679.n5.nabble.com/saveall-and-getLastInsertId-or-return-all-last-inserted-ids-td1294886.html

Perhaps create a field just to store a unique key made up of the
current date/time/random_string/index for each record being saved that
you could use for this?

Something like this...

$unique_field = sprintf( '%s-%s-', date( 'Y-m-d-H:i:s'),
random_string() );

$i = 1;
$this->data = array(
  'Model' => array(
    array(
      'name' => 'Bob',
      'unique_field' => $unique_field . $i++,
    ),
    array(
      'name' => 'Frank',
      'unique_field' => $unique_field . $i++,
    ),
    array(
      'name' => 'Ivy',
      'unique_field' => $unique_field . $i++,
    ),
  )
);

... & then lookup the entries starting with the $unique_field value?

T


On Dec 13, 8:04 pm, Leon <[email protected]> wrote:
> Hello,
>
> So in my app I have Patients and I have Groups and each Patient can be
> in many Groups and each group can have many patients. That's fine.
>
> I've got the multi-select setup on the View and that works fine too.
>
> However, I need to make some API calls in my controller when a Patient
> is edited.
> And so I need to find out what changes where just made by the user to
> their Group associations.
> Ie. Add this Patient to this Group and delete from that Group.
>
> Is there an obvious way to get this info that I'm missing?
> Just can't figure it out.
>
> Thanks for your help.
> - Leon

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to