New posts for Spring and Hibernate

This commit is contained in:
2026-11-06 01:05:27 +05:30
parent 51913ad9d4
commit dc13293046
136 changed files with 5268 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# Customer (mutable entity) -> CustomerDto (record), with nested Address, a List of Orders, a Set and a Map
fullName : Asha Mehta <- expression = java(first + " " + last)
age : 36 <- qualifiedByName, with the clock passed as @Context
nickname : anonymous <- source was null, defaultValue = "anonymous"
origin : api <- constant = "api"
address : AddressDto[street=12 Park Road, city=Pune, zip=411001, country=IN] <- postalCode renamed to zip; null country got defaultValue IN
roles : [USER] same instance as the entity's? false
attributes : {newsletter=yes} same instance as the entity's? false
--- List<Order> -> List<OrderDto>, with a computed total ---
order id=100 status=PAID total=32.50
OrderLineDto[sku=BOOK-1, quantity=2, unitPrice=12.50, lineTotal=25.00]
OrderLineDto[sku=PEN-9, quantity=10, unitPrice=0.75, lineTotal=7.50]
--- what is NOT in the record ---
passwordHash is a component of CustomerDto? false