OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions create option set field without extendExtension

This topic contains 4 replies, has 2 voices, and was last updated by  Mike Kudelya 7 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
  • #36279

    musicthebee
    Participant

    I am trying to use single table inheritance and running into issues with creating extended fields as it creates the extend fields on the first entity in the chain.

    To get around I am trying to create the option set enum and I tried to mimic the cache. But it doesnt work. Can someone please tell me how I can create option set field on a table so it shows up as “select” type in entity configuration page without using extend extension.

    Thanks

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

    musicthebee
    Participant

    Any ideas please? I want to create the select(enum) type just like other types and if you can give me some pointers on what needs change and where to start.

    Thanks

    #36281

    Mike Kudelya
    Participant

    Hi,

    I have tried your case, added entities, migrations and add Select field on System -> Entities -> Entity Management -> Son entity. Here is my files:

    src/Custom/Bundle/OroBundle/Entity/Father.php:

    src/Custom/Bundle/OroBundle/Entity/Son.php:

    Important file src/Custom/Bundle/OroBundle/Model/ExtendSon.php:

    src/Custom/Bundle/OroBundle/Migrations/Schema/v1_5/Farher.php:

    #36282

    musicthebee
    Participant

    Hi Mike

    Thanks a lot for the reply.

    The issue I am running into is because I would like the select fields to be created as part of migration.

    I need the select field on Father entity (Which is not extend entity) and another select field on Son entity. When I use the following, the select field shows up on the Son entity where as I want the select field on Father entity.

    The other use case I have multiple inheritance Father, Son, GrandSon. And I want the select fields on each of them.

    Can you please tell me how to accomplish this?

    Thanks
    M

    #36283

    Mike Kudelya
    Participant

    Hi,

    Enum type you can add only for extended entity and extended entity can be only final classes, in my case it was Son. ‘Mapped Superclasses’ and ‘Single Table Inheritance’ entities cannot be extended.

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

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

Back to top