ssossossosso

Forums

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

This topic contains 4 replies, has 2 voices, and was last updated by Mike Kudelya Mike Kudelya 1 year ago.

  • Creator
    Topic
  • #22140

    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
  • #22157

    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

    #22445
    Mike Kudelya
    Mike Kudelya
    Oro Core

    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:

    #22795

    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

    #22913
    Mike Kudelya
    Mike Kudelya
    Oro Core

    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)

You must be logged in to reply to this topic.