One to many unidirectional teachings

I am having some real problems with the doctrines of one-pointed persistence.

/** @Entity @Table(name="va_area")
 **/
class Area extends ReferenceData 
{
}

/** @Entity @Table(name="network")
 **/
class Network
{
    /**
    * @ManyToOne(targetEntity="Area")
    * @JoinColumn(name="area_code", referencedColumnName="id")
    **/
    protected $area;
}

      

when i try to set the realm value on the net using either proxy or loaded object. Doctrine tries to insert a new line inside Area. This is completely frustrating.

+3


source to share


1 answer


This problem was my fault. I used a different Entity Manager to load my children. Used the same object and solved the problem.



0


source







All Articles