OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Many to one with relationship from custom entity

This topic contains 4 replies, has 3 voices, and was last updated by  mbc 3 years, 2 months ago.

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

  • Creator
  • #31697



    I want to add a “manufacturer” entity to the existing product entity. My idea is to allow the product form to have a drop-down list that contains all of the manufacturers contained within the new custom entity. The first problem that I had was that the schema would not update, but for those that have a similar issue, I carried out the following commands which solved the problem:

    php app/console oro:entity-extend:cache:clear
    php app/console oro:entity-extend:update-config
    php app/console oro:entity-extend:update-schema

    The entities then changed from needing update to being active. However when I create a new field in the Products table and select a many-to-one field type, the new custom entity that I have created is not listed.

    Can you point me in the right direction as to what I am doing wrong, or whether this type of customisation is not possible.

    My other question is how would I go about adding the custom entity to the admin area so that it can allow data entry?

    Thanks in advance,


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


    Hi Nick. I’m looking for the exact same solution. I was wondering if you made any progress on the issue?

    Best Regards



    Hi Mads,

    I haven’t made any progress unfortunately. I think it should be out-of-the-box functionality really, as being able to search by manufacturer is available on a lot of retail sites.

    If someone from OroCommerce can chip in with any advice I’d really appreciate it.




    Do you create a regular symfony2 entity, or extended entity? If it’s regular entity then it’s impossible to create many-to-one relation due to technical limitation (there is no way to create new field in regular entity). Create extended entity
    > https://github.com/orocrm/platform/tree/master/src/Oro/Bundle/EntityExtendBundle



    Hi Nick

    Thanks for your reply and sorry for my late reply. I agree with you, that it should be included in orocommerce, but I’m wondering if could be possible to do a workaround and treat the manufacturers as customers as the built in customer management seems pretty feature rich.


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

The forum ‘OroCommerce’ is closed to new topics and replies.

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

Yes No