Add hibernate-demo: get() vs load(), merge() vs refresh(), inserting objects (Hibernate 7.4.1.Final + Spring Boot 4.1.0)
Adds a JUnit test suite (GetVsGetReferenceTest, MergeRefreshTest, OptimisticLockTest, IdentityBatchTest, SequenceBatchTest, AllocationSizeSweepTest, BatchSizeSweepTest) so every surprising behavior described in the three companion posts has a reproducible test, alongside the original CommandLineRunner scenarios. Rewrites all three doc chapters and the README around the new experiments: the get()/getReference() same-session matrix, the merge()/refresh() experiments (including exactly when OptimisticLockException surfaces and a corrected LAZY-plus- cascade merge() result), and two new sweeps (allocationSize, batch_size) for batch inserts.
This commit is contained in:
8
docs/output/allocation-and-batch-size-sweeps.txt
Normal file
8
docs/output/allocation-and-batch-size-sweeps.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
allocationSize=50, batch_size=1, 30 rows -> prepareStatementCount=32
|
||||
allocationSize=50, batch_size=10, 30 rows -> prepareStatementCount=2
|
||||
allocationSize=50, batch_size=25, 30 rows -> prepareStatementCount=2
|
||||
allocationSize=50, batch_size=50, 30 rows -> prepareStatementCount=2
|
||||
allocationSize=50, batch_size=25, 30 rows -> prepareStatementCount=3
|
||||
allocationSize=25, batch_size=25, 30 rows -> prepareStatementCount=4
|
||||
allocationSize=10, batch_size=25, 30 rows -> prepareStatementCount=5
|
||||
allocationSize=1, batch_size=25, 30 rows -> prepareStatementCount=31
|
||||
Reference in New Issue
Block a user