[DATACMNS-1322] Add support for immutable objects in PersistentPropertyAccessor Created: 17/May/18 Updated: 26/Jul/18 Resolved: 12/Jul/18
|Project:||Spring Data Commons|
|Component/s:||Core, Mapping / Conversion|
|Fix Version/s:||2.1 RC1 (Lovelace)|
|Reporter:||Mark Paluch||Assignee:||Oliver Drotbohm|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Pull Request URL:||https://github.com/spring-projects/spring-data-commons/pull/292|
|Sprint:||Lovelace M2 / M3, Lovelace RC1|
Immutable design of objects is an emerging pattern that is primarily driven from value objects and Kotlin data class perspectives.
Right now, we already support immutable objects through constructor creation when reading objects.
|Comment by Oliver Drotbohm [ 12/Jul/18 ]|
This is now basically in place. Most of the downstream modules fully support immutable types now.
However, e.g. the Elasticsearch module can't as its core APIs were not written with immutability in mind and rely on the parameters being passed being mutable. That has been mitigated by treating all properties like mutable and only using the reflection-based PersistentPropertyAccessor implementation. This needs to be addressed in the next generation of Spring Data Elasticsearch (probably Moore).