On Tuesday, 1 April 2014 07:12:49 UTC+2, Swapna V wrote:
>
> (...) that model could be improved, definitely would like to get 
> suggestions (...).
>

First thing I would do: to name all entities in singular, not plural. You 
don't have a "Users" entity, but a User. That its data is based on a 
users-table (named in plural) is OK, but the entity itself is a User, not a 
Users. It seems trivial, but it will help you in thinking in objects 
(entities) instead of tables. 

Second: what is your Relation-object? Do you need it? What is it that you 
try to model? Easier is not to start with the tables, but first have a look 
at what your "domain" is that you want to model. See next point too.

Third: I doubt if  a Relative is something else than a User. Probably 
relatives are other users. In that case it is a User entity with a 
ManyToMany association to itself: a User can have many other users as 
relatives and a User can be the relative of many other users. I always 
start with sentences like that.

 

-- 
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