OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums OroPlatform OroPlatform – How do I? Questions Extend ManyToMany – access associative table

This topic contains 2 replies, has 2 voices, and was last updated by  Marko 5 months ago.

  • Creator
    Topic
  • #37758

    Marko
    Participant

    Hi,

    Is it possible to access and extend associative table on extended ManyToMany relation?

    Example of use case:
    BusinessUnit entity (extendable) has ManyToMany Language entity (configurable).
    Update schema and clear / warmup entity-extend stuff and associative table is created e.g. “oro_rel_some_value” (columns are “business_unit_id”, “language_id”).

    I would like to access and extend “oro_rel_some_value” and add some extra columns along with getters and setters, for example I would like for “oro_rel_some_value” look like follow:

    | business_unit_id | language_id | my_extra_column_1 (bool) | my_extra_column_2 (string)

    Any ideas how this can be achieved using platform native features?

    I’m running platform 2.6.

    Many thanks,
    Marko

    • This topic was modified 5 months, 2 weeks ago by  Marko.
    • This topic was modified 5 months, 2 weeks ago by  Marko.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #37777
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Hi Marko,

    It’s not possible to add a field to the relation table.
    But for this purpose instead of using relation, you could create some intermediate entity that will have a relation to both BusinessUnit and Language and will contain extra fields you need.

    #37790

    Marko
    Participant

    Thanks @Andrey.

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

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No