I currently have that setup in the model aftersave but with 30+ related models it’s a real pain in the ass as you can imagine. I figured a behaviour would be the best idea so I am trying but cant get it to save.
So that’s where I am. Not much info on behaviours...do I save in the behaviour itself? How do I get the ID? Is it found automagicaly thru the "has" relationships? So I will keep at it. Thanks. Dave -----Original Message----- From: Anthony [mailto:[email protected]] Sent: October-12-10 3:33 PM To: CakePHP Subject: Re: AutoUpdate Modified Component / Behavior I haven't done much with the beforeSave, afterSave, etc functions but I would look into adding a section to afterSave on your related models that touches the profile its related too. On Oct 12, 11:50 am, "Dave Maharaj" <[email protected]> wrote: > A Profile has a bunch of hasMany relations. Now when viewing the Profile I > have Last Modified nothing crazy there. > > What would be the best way to update the Profile['modified'] field when a > change is made to a hasMany related table so it updates? So if Friend ( > Profile hasMany Friend ) gets a new record added / deleted / edited it > modifies the Profile['modidied'] field also? > > Thanks > > Dave Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
