This topic contains 6 replies, has 3 voices, and was last updated by hugeval 8 years, 11 months ago.
- Topic
Hi i have the following problem.
When loading the EntityA the OneToMany collection is loaded not filtered with the ownership. I’m getting always in OneToMany collections all the entities owned by different organizations. Is it possible to use ownership for OneToMany relations when loading on the inverse side ? Maybe i’m doing something wrong ?!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051/*** @Entity* @Table(name="......")**/class EntityA{protected $id;/*** @OneToMany(targetEntity="EntityB",mappedBy="entityA")*/protected $entityBs;}/*** @Entity* @Table(name="......")* @Config(* defaultValues={* "security"={* "type"="ACL",* "group_name"=""* },* "ownership"={* "owner_type"="ORGANIZATION",* "owner_field_name"="organization",* "owner_column_name"="organization_id"* },* "dataaudit"={* "auditable"=true* }* }* )*/class EntityB{protected $id;/*** @ManyToOne(targetEntity="EntityA",inversedBy="entityBs")* @JoinColumn(name="entity_a_id",referencedColumnName="id")*/protected $entityA;/*** @ManyToOne(targetEntity="Oro\Bundle\OrganizationBundle\Entity\Organization")* @JoinColumn(name="organization_id",referencedColumnName="id")*/protected $organization;}
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.