Re: [symfony-users] Re: Save embedded forms at diferent times

2009-11-26 Thread Germana Oliveira
I try to do what to told me, just to test, with the table Persona, i got this error: Unable to execute INSERT statement. [wrapped: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`indepabis/persona`, CONSTRAINT `persona_FK_1`

Re: [symfony-users] Re: Save embedded forms at diferent times

2009-11-25 Thread Germana Oliveira
I try to do what to told me, just to test, with the table Persona, i got this error: Unable to execute INSERT statement. [wrapped: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`indepabis/persona`, CONSTRAINT `persona_FK_

Re: [symfony-users] Re: Save embedded forms at diferent times

2009-11-20 Thread Stefan Paschke
Hi Germana On Nov 20, 2009, at 1:43 AM, Germana Oliveira wrote: > Wel i have this in my lib/form/AudienciaForm.class.php > > public function configure() > { >if ($this->isNew()) >{ >$conciliadorForm = new AudienciaConciliadorForm(); >$denuncianteForm = new PersonaForm(nul

Re: [symfony-users] Re: Save embedded forms at diferent times

2009-11-19 Thread Germana Oliveira
Wel i have this in my lib/form/AudienciaForm.class.php public function configure() { if ($this->isNew()) { $conciliadorForm = new AudienciaConciliadorForm(); $denuncianteForm = new PersonaForm(null, array('tipo' => 'natural')); $denunciadoForm = new PersonaForm(nul

Re: [symfony-users] Re: Save embedded forms at diferent times

2009-11-19 Thread Stefan Paschke
Hi Germana did you aggregate the object that populates the embedded form? In the main forms configure(): public function configure() { ... if ( $this->object->getPersona() == null ) { $this->object->setPersona( new Persona() ); } $persona_form = new PersonaForm( $t

Re: [symfony-users] Re: Save embedded forms at diferent times

2009-11-19 Thread Germana Oliveira
Stefan Paschke escribió: > Hi Germana > > >> I have to embedded Forms into a main Form, and i have to do this process: >> >> 1. Save the embedded Form number1 >> 2. Save the main Form (the main Form have some Foreing Key from Embedded >> Form number1) >> > > that is pretty much standard. w

Re: [symfony-users] Re: Save embedded forms at diferent times

2009-11-18 Thread Stefan Paschke
Hi Germana > I have to embedded Forms into a main Form, and i have to do this process: > > 1. Save the embedded Form number1 > 2. Save the main Form (the main Form have some Foreing Key from Embedded > Form number1) that is pretty much standard. why does it not work? How do you configure the f

[symfony-users] Re: Save embedded forms at diferent times

2009-11-17 Thread Germana Oliveira
Like nobody seems to have this problem, im trying to solve it, so im doing this: i have a mainForm : Audiencia 1 embeddedForm: Persona 1 embeddedForm: AudienciaConciliador So, my doSave function is this: protected function doSave($con = null) { if (is_null($con))