Re: [symfony-users] Doctrine insert_id

2011-04-29 Thread sergio
Thanks a lot. I musn't think in flat Mysql Enviado desde mi dispositivo BlackBerry® -Original Message- From: Gediminas Morkevicius Sender: symfony-users@googlegroups.com Date: Fri, 29 Apr 2011 17:02:02 To: Reply-To: symfony-users@googlegroups.com Subject: Re: [symfony-users] Doc

Re: [symfony-users] Doctrine insert_id

2011-04-29 Thread Gediminas Morkevicius
hi since doctrine does everything in a transaction, there is no such thing as last inserted id. you should simply provide a getId() getter in your domain object. and use: $entity = new Something; $entity->setWhatever('whatever'); $em->persist($entity); $em->flush(); // after flush all persisted

[symfony-users] Doctrine insert_id

2011-04-29 Thread sergio
Hi, could anyone tell me how can I get the last insert id with doctrine2? Thanks in advance Enviado desde mi dispositivo BlackBerry® -- 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