• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Many to one Relationship

 
Rajkumar Katudia
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi tried googling but did not quite understanding what is many-to-one relationship.

I have a mapping snippet here Please explain it to me.



I want to know what <many-to-one> means and how do I interpret it as a human and not as hibernate library.


Thanks in advance.
 
Rajkumar Katudia
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please guys help me out its important for me to know why am I doing whatever the book says.

What is meant by many to one relationship???
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many to One is like Chilren many to one Parent.

I have a single Order, in the Order there are lots of OrderLines. So from Order to OrderLines is One To Many. and the reverse an OrderLine has one and only one Order, so the relationship between OrderLine(s) to Order is ManyToOne. There are Many OrderLines to the One Order.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic