This topic contains 1 reply, has 2 voices, and was last updated by Andrey Yatsenko 5 years, 10 months ago.
- Topic
Hi All,
I’m following the sample in order/order items:
1234567891011121314/*** @var OrderItem[]|Collection** @ORM\OneToMany(targetEntity="Abb\Bundle\OrderBundle\Entity\OrderItem", mappedBy="order",cascade={"all"})* @ConfigField(* defaultValues={* "importexport"={* "full"=true* },* "dataaudit"={"auditable"=true},* }* )*/protected $items;Since I’m trying to extend Opportunity entity instead of implementing a new entity, I have to set up 1 to many relationship via ExtendExtension. I’d like to know if I can set cascade via option to implement the same feature via attribute argument cascade={“all”} like below.
12345678910$this->extendExtension->addOneToManyRelation($schema,'orocrm_sales_opportunity', // owning side table'opportunity', // owning side field name'abb_productinterest', // inverse side table['id'], // column names are used to show a title of related entity['id'], // column names are used to show detailed info about related entity['id'], // Column names are used to show related entity in a grid['extend' => ['owner' => ExtendScope::OWNER_CUSTOM],'cascade'=>['all']]);Thank you in advance!
The forum ‘OroCRM’ is closed to new topics and replies.