OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Add ManyToOne field in entity

This topic contains 1 reply, has 2 voices, and was last updated by  Vova Soroka 9 years, 9 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
  • #24803

    freelancer
    Participant

    Hi,

    I would like to add a new ManyToOne relation in my ContactRequest Entity to have a status (like in the Lead entity) but I don’t know how to do that.

    I saw I have to create a migration, but there is many versions. So do I have to create a new migration version and add my relation ? Or add it in an old migration ?
    Btw for index there is a hash how can I handle that ?

    Thanks for the answer,

    Olivier.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #24804

    Vova Soroka
    Participant

    Hi freelancer,

    You have to create the new migration only if you distribute the new version of your bundle. Also you can read detailed info about migrations in MigrationBundle. Please let me know if you have any questions about it.

    To create ManyToOne relations you can use ExtendExtension for migrations. But this works only for extendable entities, such as User, Contact etc. Unfortunately you cannot use this method for ContactRequest entity. We will analyze this and may be we will do this entity extendable in the future releases.

    Btw for index there is a hash how can I handle that ?

    Could you please describe what you mean in more details?

Viewing 1 replies (of 1 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top