This topic contains 3 replies, has 2 voices, and was last updated by Yevhen Shyshkin 9 years, 4 months ago.
- Topic
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:
123456$organization = $manager->getRepository('OroOrganizationBundle:Organization')->getFirst();...$myEntity->setOrganization($organization);...But this doesn’t work. I receive:
123PHP Catchable fatal error: Argument 1 passed to EducaCloud\Bundle\BaseTablesBundle\Entity\VocabularyTerms::setOrganization() must be an instance of Proxies\__CG__\Oro\Bundle\OrganizationBundle\Entity\Organization, instance of Oro\Bundle\OrganizationBundle\Entity\Organization given, called in /Users/ale/Sites/crm-application/src/EducaCloud/Bundle/BaseTablesBundle/DataFixtures/ORM/LoadVocabularyTermsData.php on line 56 and defined in /Users/ale/Sites/crm-application/src/EducaCloud/Bundle/BaseTablesBundle/Entity/VocabularyTerms.php on line 330Thanks
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.