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,11 @@
|
||||
createEntityAgent() returns: org.hibernate.internal.StatelessSessionImpl
|
||||
instanceof org.hibernate.StatelessSession: true
|
||||
|
||||
upsert(theme=dark) on an existing row, upsert(language=en) on a new row (2 statements)
|
||||
merge into setting as t using (select cast(? as varchar(255)) name,cast(? as varchar(255)) val) as s on (t.name=s.name) when not matched then insert (name,val) values (s.name,s.val) when matched then update set val=s.val
|
||||
merge into setting as t using (select cast(? as varchar(255)) name,cast(? as varchar(255)) val) as s on (t.name=s.name) when not matched then insert (name,val) values (s.name,s.val) when matched then update set val=s.val
|
||||
theme -> dark
|
||||
language -> en
|
||||
|
||||
insert() with an existing primary key -> jakarta.persistence.EntityExistsException
|
||||
find() after delete() -> null
|
||||
Reference in New Issue
Block a user