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
@@ -0,0 +1,37 @@
package com.ankurm.brokenprobe;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;
/**
* DELIBERATELY BROKEN entity used ONLY by
* {@code com.ankurm.hibernatedemo.namedquery.NamedQueryStartupValidationTest}, via a fully
* standalone Hibernate bootstrap (StandardServiceRegistryBuilder + MetadataSources) that never
* touches the shared Spring Boot application context.
*
* <p>Deliberately placed OUTSIDE the {@code com.ankurm.hibernatedemo} package tree. Spring
* Boot's default JPA entity scanning walks every subpackage of the {@code @SpringBootApplication}
* class's package ({@code com.ankurm.hibernatedemo}), so a broken {@code @NamedQuery} anywhere
* under that tree would fail {@code @SpringBootTest} context bootstrap for EVERY test in this
* shared repository, not just this one. Keeping it here means only the standalone bootstrap
* below ever sees it.
*/
@Entity
@Table(name = "broken_nq_employee")
@NamedQuery(name = "BrokenNamedQueryEmployee.badProperty",
query = "SELECT e FROM BrokenNamedQueryEmployee e WHERE e.firsNam = :name") // typo: firsNam
public class BrokenNamedQueryEmployee {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String firstName;
protected BrokenNamedQueryEmployee() {
}
}