Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

 Hibernate Annotation:-

Annotation is used to change the behavior of a class , method, and data member of the class using a predefined attribute.

Without using the hibernate mapping file we can map the database table using an annotation class.

The annotation will be defined under POJO Class.

@Table:-  this annotation is used to map database table from class

@Column:-  this annotation is used to map database table column

@id:-   it is used to define the primary key column of the table

@Entity:-  It is used to provide annotation to implement database schema

if we use the Annotation Mapping class then we will define the mapping class under the hibernate.cfg.xml file

<mapping class="packagename.Pojoclassname" />

All hibernate annotations exist under javax.persistent package. means javax.persistence jar file should be present in your project lib folder.

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post