This topic contains 0 replies, has 1 voice, and was last updated by bosumflici 8 years, 7 months ago.
- Topic
Hi,
I am trying to extend OroOrganization entity to add an oro_address_collection through migrations.
First i’ve created an OrganizationAddresss entity which extend AbstractTypedAddress, and i have a ManyToMany relation with Oro\Bundle\AddressBundle\Entity\AddressType, similar to OroCRM\Bundle\ContactBundle\Entity\ContactAddress.
Second, through migrations, i’ve tried to add a OneToManyRelation in OroOrganization directing to OrganizationAddress, similar to OroCRM\Bundle\ContactBundle\Entity\ContactAddress addresses.
$this->extendExtension->addOneToManyRelation(
$schema,
'oro_organization',
'org_addr',
'brains_org_org_addr', // This comes from in OrganizationAddress entity
['id'],
['id'],
['id'],
[
'oro_options' => [
'extend' => [
'without_default' => true,
]
]
]
);
The problem appears when i am running migrations, i get the following error:
[Oro\Bundle\EntityConfigBundle\Exception\RuntimeException]
ConfigProvider::getClassName expects Object, PersistentCollection, array of entities or string. “NULL” given…
ERROR: The command terminated with an exit code: 1.
Any ideea what i am doing wrong?
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.