Add flush-ordering module: Hibernate 8.0.0.CR2 graph vs legacy flush queue

Seven runnable scenarios that record the real JDBC SQL under
hibernate.flush.queue.type=legacy and graph: insert order, delete order,
unique delete-then-reinsert, unique swap, NOT NULL FK, batching, setting values.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b3obqqePfZ9m2Jk5Ub
This commit is contained in:
Claude
2026-11-26 18:13:08 +05:30
parent 453fad0ee7
commit 4f7ebd5cb0
12 changed files with 584 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Prints the flush settings and queue types straight from the Hibernate jar, so nothing here is quoted from prose.
# Run "mvn -q dependency:resolve" first so the jar is in ~/.m2. Needs a JDK (javap).
set -euo pipefail
JAR=$(find "$HOME/.m2" -name 'hibernate-core-8.0.0.CR2.jar' | head -1)
echo "jar: $(basename "$JAR")"
javap -constants -cp "$JAR" org.hibernate.cfg.FlushSettings 2>/dev/null
javap -cp "$JAR" org.hibernate.action.queue.spi.QueueType 2>/dev/null | grep 'static final .*QueueType [A-Z]*;'
javap -cp "$JAR" 'org.hibernate.action.queue.spi.PlanningOptions$UniqueCycleStrategy' 2>/dev/null | grep 'static final .*UniqueCycleStrategy [A-Z_]*;'
echo "legacy execution order (enum constants, in declaration order):"
javap -p -cp "$JAR" 'org.hibernate.engine.spi.ActionQueueLegacy$OrderedActions' 2>/dev/null | grep -E 'OrderedActions [A-Z][A-Za-z]*;'