I am using hibernate.What is the use In Data(POJO) class primary key is sending as an argument with constructor?

Showing Answers 1 - 3 of 3 Answers

since according to the hibernate specifications hbm file is configured in such a way that one primary key shoud be configured in id tag of hbm file.and other properties are configured in property tags.

the same properties are implemented in POJO(Plain Old Java Objects).
so when we are dealing with database like insertion or updation then we give primary key to deal with that particular record.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions