ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 0 replies, has 1 voice, and was last updated by  bosumflici 2 years, 1 month ago.

  • Creator
    Topic
  • #13352

    bosumflici
    Participant

    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?

You must be logged in to reply to this topic.