i would use a behavior "ModifyUpdatable" or something that checks if there are any "parent relations" and if so triggers the update of the timestamps
for performance issues you could manually define the parent relations to be modified so it can update right away instead of checking on existing "modified" fields in the table i guess lots of cakers could find this piece of snippet very useful - including me :) On 25 Jan., 16:25, Javier <[email protected]> wrote: > Is it possible to automagically update 'modified' field in a > 'belongsTo' table when a table is updated. > > my example is this: I have two tables with 'modified' > fields...'families' and 'family_members'. models are Family hasMany > FamiyMember, FamilyMember belongsTo Family. > > When I edit an existing family_member the 'modified' field gets > updated in 'family_members' table. I would like 'modified' to get > updated in the 'families' table as well. How can I do that? > > thanx in advance 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
