[symfony-users] Re: How to get ID of last object insert

2009-09-24 Thread ferdjuan
bindAndSave() is a life saver, it returns true if the form validates and if the data is saved into the database, take a look at http://www.symfony-project.org/forms/1_2/en/04-Propel-Integration for more information, that tutorial is terrific. The downside however is that it returns a boolean, and

[symfony-users] Re: How to get ID of last object insert

2009-09-24 Thread Eno
On Thu, 24 Sep 2009, ferdjuan wrote: bindAndSave() is a life saver, it returns true if the form validates and if the data is saved into the database, take a look at http://www.symfony-project.org/forms/1_2/en/04-Propel-Integration for more information, that tutorial is terrific. The downside

[symfony-users] Re: How to get ID of last object insert

2009-09-23 Thread Farrukh Abbas
i have always used the construct below if($this-form-isValid()){ $object = $this-form-save(); $id = $object-getId(); } seeing bindandsave for the first time... the save function of the form automatically sets the id of the object or in other words returns the recently saved object. On Thu,