Files
spring-boot-demo/mapstruct/output/06-update-in-place.txt
T

12 lines
581 B
Plaintext

# @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