Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1322

Add support for immutable objects in PersistentPropertyAccessor

    XMLWordPrintable

    Details

      Description

      Immutable design of objects is an emerging pattern that is primarily driven from value objects and Kotlin data class perspectives.
      Spring Data requires a certain degree of object mutability to assign generated identifiers, version numbers (using optimistic locking), or auditing. This works by accident using reflection to set final fields.
      We should investigate on a possibility to leverage wither methods or Kotlin's built-in support to create new object instances that are associated with identifiers and version numbers.

      Right now, we already support immutable objects through constructor creation when reading objects.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              mp911de Mark Paluch
              Last updater:
              Mark Paluch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: