Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Forums OroPlatform OroPlatform – Programming Questions How to use AttachementBundle and File relation ?

This topic contains 4 replies, has 2 voices, and was last updated by adriwan_kenoby adriwan_kenoby 1 month, 2 weeks ago.

  • Creator
    Topic
  • #34586
    adriwan_kenoby
    adriwan_kenoby
    Participant

    Hi Oro Team,

    I am trying to add an Image Relation to a custom entity.

    However I always have this exception

    Is their something missing in the documentation ?

    This is the entity

    Installer

    Migrations

    Type

    And View

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #34587
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    The problem is that your entity is not configurable so you can’t add extra fields.

    Add @Config() annotation to News entity,
    run below commands:

    Reload the page, everything should work.

    #34588
    adriwan_kenoby
    adriwan_kenoby
    Participant

    Already done,

    I had noticed that I had forgotten the @Config annotation.

    But still not working.

    #34592
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Try to revert the database state and run again app/console oro:platform:update --force with the new migration.

    For me, everything works with the above code and added @Config annotation.
    The problem probably that you are running platform:update on already installed migration and it’s not executed again.

    #34593
    adriwan_kenoby
    adriwan_kenoby
    Participant

    Thank you Andrey. In fact it works.

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

You must be logged in to reply to this topic.

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

Yes No
ssossossossossosso