. Hibernate Basics & Core Concepts
- What is Hibernate? Why is it used?
- ORM (Object-Relational Mapping) vs JDBC
- JPA vs Hibernate (Specification vs Implementation)
- Hibernate Architecture & Components
SessionFactory
, Session
, Transaction
, Query
, Criteria
- First-Level Cache & Second-Level Cache
- Hibernate Lifecycle & States of an Entity (
Transient
, Persistent
, Detached
, Removed
)
- save, persist, merge and update difference
2. Hibernate Configuration
- Configuring Hibernate with
hibernate.cfg.xml
and persistence.xml
- Hibernate Properties (
hibernate.dialect
, hibernate.show_sql
, etc.)
- Difference between
persistence.xml
and hibernate.cfg.xml
- Programmatic Configuration (without XML)
3. Entity Mapping & Annotations
- Basic Annotations:
@Entity
, @Table
, @Column
, @Id
, @GeneratedValue
- Primary Key Strategies:
AUTO
, IDENTITY
, SEQUENCE
, TABLE
- Column Constraints:
@UniqueConstraint
, @NotNull
, @Size
, @Column(nullable = false)
- Attribute Overrides (
@AttributeOverride
, @AttributeOverrides
)
- Enumerations & Converters (
@Enumerated
, AttributeConverter
)