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:
Executable
+11
@@ -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]*;'
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Runs the whole suite and prints the transcripts it wrote to target/transcripts/. Needs JDK 25 and Maven.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
mvn -B -q test
|
||||
for f in target/transcripts/*.txt; do
|
||||
echo "##### $f"
|
||||
cat "$f"
|
||||
echo
|
||||
done
|
||||
Reference in New Issue
Block a user