Why don’t we just specify the table name and column name? How specifying many-to-one helps in generating query?
Why don’t we just specify the table name and column name? How specifying many-to-one
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hibernate is an ORM tool. Object Relational Mapping. The tool needs to understand the relationships between classes.
If you continue down your line of thought, why do we need to map one-to-many, or any other relationship?
Lets say you have a class Child, many of which can be on instances of Parent. If your relationship is bidirectional, a child instance would have a reference to an instance of Parent.
So if you loaded a child instance, hibernate needs to know how that child is related to its Parent.