OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Installation/Technical Issues or Problems Bug? EntityExtendBundle ExtendExtension addManyToOneInverseRelation

This topic contains 4 replies, has 3 voices, and was last updated by  Christoph Köpernick 6 years, 11 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
  • #35387

    I either don’t understand addManyToOneInverseRelation() or may have found a bug in EntityExtendBundle/ExtendExtension->addManyToOneInverseRelation().

    Instead of:

    This works for me:

    Reproduce:

    Without bugfix mentioned above, it yields the following error when running

    :

    If the folling parameters of addManyToOneInverseRelation()

    would really meant to be from $targetTable, EntityConfig would be incorrect. Incorrect example using “title” from $contactDataFieldTable instead “value” from $contactDataTable:

    This example migrates, but yields errors in the CRM application “Field ContactData::title is not configurable”. When I have a look at the Entity Management and relations I see that neither of the 3 select menus has a selected item. Simply because “title” is not available in “ContactData”, but “value” is.

    Please correct me if I totally misunderstood the desired behaviour of addManyToOneInverseRelation() or maybe fix this bug.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #35388

    Mike Kudelya
    Participant

    Hi

    We will investigate this issue.
    Thank you!

    #35389

    Mike Kudelya
    Participant

    Hi

    Bug will be fixed in the next release of 1.10 and master branch in the few days.
    Thank you for your reporting.

    #35390

    shaopeihui1
    Participant

    I believe this bug has been fixed in version 1.10.
    But, Christoph, what does ‘data’ in your addManyToOneInverseRelation function refer to?
    Seems it’s not an existing column.

    #35391

    Yes it has been fixed. In my example, “data” was the name for the new field that handels the bi-directional relation. It’s not a field that was there before, but it’s created by the call mentioned above. It’s up to you how to name your fields when creating or extending tables. The field name for such a relation are not actually columns in terms of relational database schema, but as far as I know, m:n tables will be created. After the bug was fixed, by example might cause confusion. Have a look at the updated documentation instead.

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroPlatform – Installation/Technical Issues or Problems’ is closed to new topics and replies.

Back to top