If it helps.. this is the error, of course because it lost the id.. SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 1 stack trace
* at () in SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php line 1082 ... 1079. $message .= sprintf('. Failing Query: "%s"', $query); On Wed, Feb 17, 2010 at 5:20 PM, Samuel Morhaim <samuel.morh...@gmail.com> wrote: > I am getting an error when doing a simple edit/update ... the ID of > the item is being lost. > > This is the DB log... maybe somebody can help ? > > > # > > SELECT c.id AS c__id, c.organization_id AS c__organization_id, c.name > AS c__name, c.description AS c__description, c.is_active AS > c__is_active FROM campaign c WHERE (c.id = '2') LIMIT 1 > 0.00s, "doctrine" connection Toggle debug stack > #23 » in sfDoctrineConnectionProfiler->preStmtExecute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/EventListener/Chain.php > line 494 > #22 » in Doctrine_EventListener_Chain->preStmtExecute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Statement.php > line 231 > #21 » in Doctrine_Connection_Statement->execute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php > line 1006 > #20 » in Doctrine_Connection->execute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php > line 976 > #19 » in Doctrine_Query_Abstract->_execute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php > line 1026 > #18 » in Doctrine_Query_Abstract->execute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query.php > line 281 > #17 » in Doctrine_Query->fetchOne() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Table.php > line 1611 > #16 » in Doctrine_Table->find() from > SF_ROOT_DIR/apps/backend/modules/campaign/actions/actions.class.php > line 53 > #15 » in campaignActions->executeUpdate() from > SF_SYMFONY_LIB_DIR/action/sfActions.class.php line 60 > #14 » in sfActions->execute() from > SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 92 > #13 » in sfExecutionFilter->executeAction() from > SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 78 > #12 » in sfExecutionFilter->handleAction() from > SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 42 > #11 » in sfExecutionFilter->execute() from > SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53 > #10 » in sfFilterChain->execute() from > SF_SYMFONY_LIB_DIR/filter/sfBasicSecurityFilter.class.php line 72 > #9 » in sfBasicSecurityFilter->execute() from > SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53 > #8 » in sfFilterChain->execute() from > SF_ROOT_DIR/plugins/sfDoctrineGuardPlugin/lib/sfGuardRememberMeFilter.class.php > line 56 > #7 » in sfGuardRememberMeFilter->execute() from > SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53 > #6 » in sfFilterChain->execute() from > SF_SYMFONY_LIB_DIR/filter/sfRenderingFilter.class.php line 33 > #5 » in sfRenderingFilter->execute() from > SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53 > #4 » in sfFilterChain->execute() from > SF_SYMFONY_LIB_DIR/controller/sfController.class.php line 229 > #3 » in sfController->forward() from > SF_SYMFONY_LIB_DIR/controller/sfFrontWebController.class.php line 48 > #2 » in sfFrontWebController->dispatch() from > SF_SYMFONY_LIB_DIR/util/sfContext.class.php line 170 > #1 » in sfContext->dispatch() from SF_ROOT_DIR/web/backend_dev.php line 13 > # > > SELECT c.id AS c__id, c.organization_id AS c__organization_id, c.name > AS c__name, c.description AS c__description, c.is_active AS > c__is_active FROM campaign c WHERE (c.id = '') > 0.00s, "doctrine" connection Toggle debug stack > #31 » in sfDoctrineConnectionProfiler->preStmtExecute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/EventListener/Chain.php > line 494 > #30 » in Doctrine_EventListener_Chain->preStmtExecute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Statement.php > line 231 > #29 » in Doctrine_Connection_Statement->execute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php > line 1006 > #28 » in Doctrine_Connection->execute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php > line 976 > #27 » in Doctrine_Query_Abstract->_execute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php > line 1026 > #26 » in Doctrine_Query_Abstract->execute() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query.php > line 281 > #25 » in Doctrine_Query->fetchOne() from > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/validator/sfValidatorDoctrineUnique.class.php > line 99 > #24 » in sfValidatorDoctrineUnique->doClean() from > SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 90 > #23 » in sfValidatorSchema->clean() from > SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 246 > #22 » in sfValidatorSchema->postClean() from > SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 186 > #21 » in sfValidatorSchema->doClean() from > SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 90 > #20 » in sfValidatorSchema->clean() from > SF_SYMFONY_LIB_DIR/form/sfForm.class.php line 247 > #19 » in sfForm->doBind() from > SF_SYMFONY_LIB_DIR/form/addon/sfFormSymfony.class.php line 75 > #18 » in sfFormSymfony->doBind() from > SF_SYMFONY_LIB_DIR/form/sfForm.class.php line 227 > #17 » in sfForm->bind() from > SF_ROOT_DIR/apps/backend/modules/campaign/actions/actions.class.php > line 77 > #16 » in campaignActions->processForm() from > SF_ROOT_DIR/apps/backend/modules/campaign/actions/actions.class.php > line 56 > #15 » in campaignActions->executeUpdate() from > SF_SYMFONY_LIB_DIR/action/sfActions.class.php line 60 > #14 » in sfActions->execute() from > SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 92 > #13 » in sfExecutionFilter->executeAction() from > SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 78 > #12 » in sfExecutionFilter->handleAction() from > SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 42 > #11 » in sfExecutionFilter->execute() from > SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53 > #10 » in sfFilterChain->execute() from > SF_SYMFONY_LIB_DIR/filter/sfBasicSecurityFilter.class.php line 72 > #9 » in sfBasicSecurityFilter->execute() from > SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53 > #8 » in sfFilterChain->execute() from > SF_ROOT_DIR/plugins/sfDoctrineGuardPlugin/lib/sfGuardRememberMeFilter.class.php > line 56 > #7 » in sfGuardRememberMeFilter->execute() from > SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53 > #6 » in sfFilterChain->execute() from > SF_SYMFONY_LIB_DIR/filter/sfRenderingFilter.class.php line 33 > #5 » in sfRenderingFilter->execute() from > SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53 > #4 » in sfFilterChain->execute() from > SF_SYMFONY_LIB_DIR/controller/sfController.class.php line 229 > #3 » in sfController->forward() from > SF_SYMFONY_LIB_DIR/controller/sfFrontWebController.class.php line 48 > #2 » in sfFrontWebController->dispatch() from > SF_SYMFONY_LIB_DIR/util/sfContext.class.php line 170 > #1 » in sfContext->dispatch() from SF_ROOT_DIR/web/backend_dev.php line 13 > # > > UPDATE campaign SET name = 'TER', id = '' WHERE id = '2' > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.