[FLOW3-general] value objects doesn´t persists

Elías Fernández eliasfernandez at gmail.com
Fri Jun 25 12:19:27 CEST 2010


Hello all,
I´m playing with flow, and all works nice until i tried to set a value
object from fluid form.

I have a Customer class with:

protected $name = '';

protected $user;

...

/*

* @var \F3\Invoice\Domain\Model\Address

*/

protected $address;



The last property has this getter setter,

/**

*

* @return \F3\Invoice\Domain\Model\Address $address

*/

public function getAddress() {

  return $this->address;

}

/**

* @param \F3\Invoice\Domain\Model\Address $address

* @return void

*/
public function setAddress(\F3\Invoice\Domain\Model\Address $address) {

  $this->address = $address;
}


Where \F3\Invoice\Domain\Model\Addressis a @valueboject with @scope
prototype has street, zip, locality, region strings vara

and the fluid form has this inputs:

<f:form.textbox property="address.street" id="address.street" /><br />
<f:form.textbox property="address.zip" id="address.zip" /><br />
<f:form.textbox property="address.locality" id="address.locality" /><br />
<f:form.textbox property="address.region" id="address.region" /><br />

When i send this form to the createController i f3\var_dump the submitted
object, and  cool¡, it works, it automatically set the address as a Address
object.

But, it doesn´t save in the persistence layer. When i f3\var_dump in next
steps ( like show actions ), the customer object has a null address. :(

Somebody could said me something about ?

i´m using flow3 alpha 8

many thanks in advance




Elías Fernández Velázquez


More information about the FLOW3-general mailing list