I think it's because '$foo' is not an object but rather a set of objects returned by the find() method.
-stan On Tue, Nov 30, 2010 at 12:54 PM, Martin Henits <[email protected]>wrote: > I know it is a very silly question. > > How can I just update a db field in one of the actions? > > suppose that my code is like this: > > public function executeConfirm(sfWebRequest $request) { > $foo = Doctrine::getTable('foo')->find(array($request- > >getParameter('foo_id'))); > $foo->setConfirmed(1); > $foo->save(); > } > > > the above code doesn't work as the change doesn't save into the > database. > > cheers > > -- > 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]<symfony-users%[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
