Hibernate
Hibernate
Provides JPA implementation hence we can use JPA annotations as well as xml
configurations to achieve mapping.
2. Advantages - Eliminates JDBC biler plate. Supports HQL whic is more Object
oriented. Provides transaction management implicitly. Throws JDBC or Hibernate
Exception - unchecked - hence no need to handle. Also supports caching for better
performance.
4. Important Annotations
Entity, Table, Access(Field or porperty(getters/setters)), Id, EmbeddedId, Column,
GeneratedValue, OneToOne, Cascade, PrimaryKeyJoinColumn
8. Steps -> Create POJO - Craete mapping file - Create config file - Creare
Repository CLass - Run
9. get() and load(). get loads the date as soon as it is called, load returns a
proxy object and loads data when required - lazy loading
load throws exception when data not found