On Tuesday, 1 April 2014 10:34:44 UTC+2, Herman Peeren wrote:
>
> (...)  there is no necessity to make Member a separate entitiy; only do 
> that if membership has some extra properties or behaviour. In the simplest 
> case you can just have group_members as a join-table, but it doesn't need 
> to be a separate entity. If you need it to be a separate entity I would not 
> call it Member, but Membership or Subscription or something else that 
> describes that entity.
>

Sorry, in your table-definition you give such an extra property that would 
give the necessaity for a third entity (Membership) between users and 
groups: is_teacher. So the ManyToMany relation between users and groups is 
split into two OneToMany relations: between Group and Membership and 
between User and Membership. 

I call it Membership, not Member or GroupMember, because a Member is not a 
different thing (entity) apart from a User. Think of entities as "things" 
and only make something another entity if it is another thing.

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to