If class A has an association, say, one-to-many for B, and the ArrayCollection variable in is called $ bcollection, then the YAML section for cascade = {"persist"} will look like this:
oneToMany: bcollection: targetEntity: Entities\B cascade - persist mappedBy: contact inversedBy: null orphanRemoval: false orderBy: null
source share