'label',// column name is used to show related entity
['extend'=>[
'owner'=>ExtendScope::OWNER_CUSTOM,
'cascade'=>["persist","remove"]]
]
);
}
}
When i perform the command php app/console cache:clear-vvv, i get this error: PropertyOro\Bundle\OrganizationBundle\Entity\Organization::$head_officedoes notexist
And the file in the cache doesn’t implement new value:
As for another entity extended from Oro\Bundle\OrganizationBundle\Model\ExtendOrganization – it’s not recommended as each extended entity has to have it’s own extended classes. Otherwise application simply will not be able to create correct class aliases for extented entities.
My problem is solved by removing the ExtendOrganization on other entity.
What is the recommended way to make this entity same as Organization (with the same properties, relation, etc..) ? Do i have to duplicate entire Organization entity with his migrations ?
The easiest solution is indeed just make a copy of the original organization entity, call it e.g. AdvancedOrganization and then create separate extended model class called ExtendAdvancedOrganization – this way you will have your own independent organization and independent extended entity for it.
Pay attention that in this case new organization entity will not inherit built in organization related features like ACL, ownership etc.
But before that you may stop for a moment and think a little about two absolutely identical entities in your application (which looks like violation of SOLID). Maybe you can add extended boolean flag (e.g. isAdvanced) to the standard Organization entity and distinguish them in this way? Or set some organization as a special organization in the System Configuration and then use this reference to identify it? Or your custom organization logic can be emulated using standard Business Units?
We collect cookie information with a goal to provide you with the best user experience. By using this website, you agree to our use of cookies. Read Oro Inc.’s Cookie policy.
We collect cookie information with a goal to provide you with the best user experience. By using this website, you agree to our use of cookies. Read Oro Inc.’s Cookie policy.