Hibernate Interview Questions


1. What are the main classes of  Hibernate
  • Session
  • SessionFactory
  • Criteria
  • Query
  • Transaction
2. Lazy loading vs Eager Loading

3. Why is second-level caching not enabled by default?
The second Level cache is disabled by default because the configuration and choice of which entities are cacheable is application-specific.
In JPA, you can turn on cache for a particular domain with annotation @Cacheable


Comments

Popular posts from this blog

Apache Airflow Wait Between Tasks