mkk mkk -4 years ago 226
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)


Answer Source

This works for me

      targetEntity: Name
      mappedBy: product
      cascade: ["persist"]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download