What is the difference between these 2 annotations ?<br /> <br /> @Entity<br /> <br /> @Entity ( name="EMPLOYEES" )
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Java - Interview Questions and Answers

 Q1. What is the difference between these 2 annotations ?

@Entity

@Entity ( name="EMPLOYEES" )
Hibernate
admin
info@buggybread.com
Ans. The first annotation will try to map the Class with the Table as of same name as Class whereas the second annotation will specify the Entity name as "EMPLOYEES" and hence will try to map with Table Name "EMPLOYEES".

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hibernate   hibernate annotations   entity annotations


Related Questions

  What is the use of @GeneratedValue annotation in Hibernate?
  What entries we make in the hibernate config file if we are not using hbm files but Annotations ?
 What is the difference between these 2 annotations ?

@Entity ( name ="EMPLOYEES")
@Entity @Table ( name=""EMPLOYEES"" )

@Entity ( name="EMP")
@Table ( name="EMPLPYEES" )



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: