Add Hibernate 7 batches 2-6, batch 7, and batch 8: mapping styles, JPA annotations, natural IDs, @Immutable, stored procedures, in-memory test databases, JNDI mocking, proxies, associations, temporal mapping, named queries, HQL, Criteria API, EntityManager bootstrapping, Ehcache 3 L2 cache configuration, HikariCP connection pooling, Hibernate Validator CDI integration, aggregate functions, sorting, pagination, interceptors, and Hibernate Search 8 (Hibernate 7.4.5.Final + Spring Boot 4.1.1 + JDK 25)

This commit is contained in:
2026-09-20 06:06:42 +00:00
committed by Claude
commit 8568c0ce6c
330 changed files with 23668 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
cascade=ALL + orphanRemoval=true, in-place removeIf(): books before=3, books after=1
orphanRemoval=false: after removing book2 from author.books and flushing, book2 row still exists = true, author_id still = 1
owning side test: mutated only author2.getBooks().add(book) (inverse side), book.author after flush = null (FK not written)
cascade=ALL + orphanRemoval=true, reassigning the collection reference -- wrapper: jakarta.persistence.RollbackException
cascade=ALL + orphanRemoval=true, reassigning the collection reference -- root cause: org.hibernate.HibernateException: A collection with orphan deletion was no longer referenced by the owning entity instance: com.ankurm.hibernatedemo.association.CascadeAuthor.books
/* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
Hibernate: /* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
/* delete for com.ankurm.hibernatedemo.association.CascadeBook */delete from cascade_book where id=?
Hibernate: /* delete for com.ankurm.hibernatedemo.association.CascadeBook */delete from cascade_book where id=?
/* delete for com.ankurm.hibernatedemo.association.CascadeBook */delete from cascade_book where id=?
Hibernate: /* delete for com.ankurm.hibernatedemo.association.CascadeBook */delete from cascade_book where id=?
/* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
Hibernate: /* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
/* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
Hibernate: /* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
/* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
Hibernate: /* DELETE FROM CascadeBook */ delete from cascade_book cb1_0