ssossossosso

Forums

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

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

  • Creator
    Topic
  • #35420
    thinh2010
    thinh2010
    Participant

    Hi,

    I want to add more fields in Business Unit entity. So that I use migration to do that.
    I added the relationship OneToMany, named ‘rooms’
    Now in twig, I want to get all rooms of my business unit, I called entity.rooms but not success because in business unit entity class dont have getRooms() function.
    The question is how can I get the list of rooms?
    I dont want to use owner ExtendScope::OWNER_CUSTOM, because the twig display rooms is not the view detail of business unit.

    Thanks,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #35518

    igalayev
    Participant

    Hi, after relationship is added via migration then getter and setter should be generated in ExtendBusinessUnit class.

    In dev environment you should be able to see them in /app/cache/dev/oro_entities/Extend/Entity/EX_OroOrganizationBundle_BusinessUnit.php

    Make sure that after migration was run updated file is loaded (e.g. restart consumer, clear cache).

    #35786
    thinh2010
    thinh2010
    Participant

    Hi,

    Yes, my bad, I clear the cache and problem resolve. Thanks

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

You must be logged in to reply to this topic.