OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Organization field and data fixtures

This topic contains 3 replies, has 2 voices, and was last updated by  Yevhen Shyshkin 9 years, 4 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
  • #33547

    alendo
    Participant

    I’m trying to set data by using data fixture, with the 1.4 orocrm version it is necessary to set organization field in entities, but I don’t know how to find the organization because I don’t know organization name in this phase. I’ve seen that in other fixtures it is set to “default organization” but I don’t want to configure “default organization” in my db. So I would like to find the first organization in my db and set the field to it:

    But this doesn’t work. I receive:

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #33548

    Yevhen Shyshkin
    Participant

    Hello.

    Please, check signature of your setOrganization method – look’s it uses proxy (Proxies\__CG__\Oro\Bundle\OrganizationBundle\Entity\Organization) instead of original organization entity (Oro\Bundle\OrganizationBundle\Entity\Organization).

    #33549

    alendo
    Participant

    Hello Yevhen thank you. Is it possible to run oro:install only for one bundle to test migration and load data functionalities?

    #33550

    Yevhen Shyshkin
    Participant

    > Is it possible to run oro:install only for one bundle to test migration and load data functionalities?

    Probably no, but you can run separately oro:migration:load and oro:migration:data:load – these command run all not installed migrations. So, you can dump your DB, run migrations and rollback to old DB state in case of some errors.

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

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

Back to top