Well, I suppose I can live with it for the moment. My ideal solution would be like this:
$supplier = $form->save(); if ($supplier->isModified()) return 'changes'; else return 'nochange'; but I'm afraid I need more time before I can come up with a solution to this myself. I'm not just learning Symfony, I'm learning OOP as well at the same time, which is a bit of a challenge. Having lots of fun at it though... :) Many thanks, Burt. On Nov 14, 7:35 pm, Daniel Lohse <[email protected]> wrote: > Yes, you can indeed do that — I might have a look at the Timestampable > behavior and see what it does, maybe you'll get some more insights into how > you can do this some other way but if you can live with your solution then > that's also fine. :) > > Cheers, Daniel > > Sent from my iPad > > On Nov 15, 2010, at 1:08 AM, LeBurt <[email protected]> wrote: > > > > > > > > > Well, we can mark this one solved. Daniel's solution seemed simple and > > elegant but I couldn't really figure it out with my cuurent level of > > knowledge. Then I read Richtermeister's post again and fathomed that > > all I'd have to do is add the timestampable behavior on my Doctrine > > class and then do this in my action: > > > $lastUpdate = $this->supplier->getUpdatedAt(); > > $form->save(); > > $newUpdate = $this->supplier->getUpdatedAt(); > > > if ($lastUpdate != $newUpdate) return 'changes'; > > else return 'nochanges'; > > > Works like a charm and it's simple enough for my needs. > > > Thanks all for the inspiration. > > > Burt. > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > You received this message because you are subscribed to the Google > > Groups "symfony users" 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/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en
