Add embeddables module: @Embeddable records in Hibernate 7.4.17.Final (columns and round trip, null handling, collections of embeddables and their SQL, record equality vs database equality, @EmbeddedId records, DDD Email value object, failure modes; H2)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b3obqqePfZ9m2Jk5Ub
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# A record with primitive components (Dim(int width, int height)) as an optional embedded attribute
|
||||
# Hibernate ORM 7.4.17.Final, H2 2.4.240, JDK 25
|
||||
|
||||
== Columns of table box
|
||||
HEIGHT | INTEGER | null | 32 | 0 | YES
|
||||
WIDTH | INTEGER | null | 32 | 0 | YES
|
||||
ID | BIGINT | null | 64 | 0 | NO
|
||||
-- persist Box(1, Dim(3, 4))
|
||||
sql> insert into Box (width,height,id) values (?,?,?)
|
||||
=> persisted
|
||||
-- persist Box(2, null)
|
||||
sql> insert into Box (width,height,id) values (?,?,?)
|
||||
=> persisted
|
||||
rows: [4 | 3 | 1, null | null | 2]
|
||||
Reference in New Issue
Block a user