Hibernate 8 + Jakarta Persistence 4: EntityAgent and stateless sessions demo
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7jUQrypvpE1ix1k7V
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
EntityManager.persist x 5000 in one transaction
|
||||
entities held in the persistence context at the end: 5000
|
||||
entity inserts: 5000 statements prepared: 1
|
||||
|
||||
EntityAgent.insert x 5000 in one transaction
|
||||
entities held anywhere: 0 (a StatelessSession has no persistence context)
|
||||
entity inserts: 5000 statements prepared: 5000
|
||||
|
||||
EntityAgent.insertMultiple(list of 5000)
|
||||
entity inserts: 5000 statements prepared: 1
|
||||
|
||||
publisher.id before insert: null
|
||||
publisher.id after insert: 1 (insert() itself returns void)
|
||||
Reference in New Issue
Block a user