OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions Extend Organization with an oro_address_collection

This topic contains 0 replies, has 1 voice, and was last updated by  bosumflici 8 years, 7 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36062

    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?

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top