php - Symfony 2: The annotation @ORM\OneToMany declared on property AppBundle\Entity\Genre::$movie does not have a property named "onDelete" -
i've been trying use ondelete="set null" 1 of entities, returns error:
[creation error] annotation @orm\onetomany declared on property appbundle\entity\genre::$movie not have property named "ondelete". available properties: mappedby, targetentity, cascade, fetch, orphanremoval, indexby
entity looks this:
/** * movie array * * @orm\onetomany( * targetentity="appbundle\entity\movie", * mappedby="genres", * ondelete="set null") * */ protected $movie;
what doing wrong?
you should use "ondelete" property on orm\joincolumn , not on relation. error saying not property of relation. try like:
@orm\joincolumn(name="moviee_id", referencedcolumnname="id", nullable=true, ondelete="set null")
replace field name per need
Comments
Post a Comment