Same payment hierarchy mapped three ways plus @MappedSuperclass, run with plain Hibernate on H2. Tests assert and write the generated DDL, the INSERT/SELECT SQL, row/insert/FK/nullability counts and the three failures (NOT NULL on a SINGLE_TABLE subclass column, IDENTITY with TABLE_PER_CLASS, querying a @MappedSuperclass); Bench writes indicative polymorphic-query timings. No docs folder: depth lives in the post.
8 lines
409 B
Bash
Executable File
8 lines
409 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Writes output/04-polymorphic-timings.txt. Timings are indicative: they drift between runs and machines.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
mvn -B -q test-compile dependency:build-classpath -Dmdep.outputFile=target/cp.txt -Dmdep.includeScope=test
|
|
java -cp "target/classes:target/test-classes:$(cat target/cp.txt)" com.ankurm.inheritance.Bench
|
|
cat output/04-polymorphic-timings.txt
|