I just started working with symfony and doctrine. I have a simple entity which has one property is not tied with the database. This property should contain the contents of the xml file (I wanna make xml file, when doctrine add rows to the database).
/**
* Layouts
*
* @ORM\Table(name="layouts")
* @ORM\Entity
* @ORM\HasLifecycleCallbacks()
*/
class Layouts
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="SEQUENCE")
* @ORM\SequenceGenerator(sequenceName="layouts_id_seq", allocationSize=1, initialValue=1)
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, nullable=false)
*/
private $name;
/**
* ???????
*/
private $template_body;
...
}
How to describe $template_body
property? Without leaving the property description, I ran into a problem - the doctrine does not cause preUpdate method when I edit this property in the form.