mkk mkk - 1 year ago 62
PHP Question

Doctrine 2.1: how to set "cascade: persist" using yaml

I get an error when I try to do

$b = new B();

because I first need to persist $b, however I cannot do this, so I need to set cascade: persist I believe. I just cannot find in documentation how to do this using yaml schema.
Documentation does not cover this part ( I tried in other places in documentation as well)


mkk mkk
Answer Source

This works for me

      targetEntity: Name
      mappedBy: product
      cascade: ["persist"]