New posts for Spring and Hibernate
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# @MappingTarget updates: nested objects and collections are changed in place
|
||||
|
||||
|
||||
--- patch only the city and the roles ---
|
||||
address: [email protected], nickname=null, roles=[USER, ADMIN], address=12 Park Road/Mumbai/411001
|
||||
same Address instance as before? true <- AddressMapper.update was called on it
|
||||
same roles Set instance as before? true <- cleared and refilled, not replaced
|
||||
another holder of the old roles Set now sees: [AUDITOR]
|
||||
|
||||
--- an immutable collection on the target ---
|
||||
patching roles on a Set.of(...) target threw: java.lang.UnsupportedOperationException
|
||||
Reference in New Issue
Block a user