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

Unify is-new-detection for entities in mapping package

    XMLWordPrintable

    Details

    • Sprint:
      Lovelace RC1

      Description

      For historic reasons, we currently have multiple places in which identifier lookups and the algorithm for the is-new-detection is implemented. Originally implemented in the EntityInformation abstraction (which was tied to repositories), we now also keep a similar implementation in IsNewStrategy used via a factory mostly from the auditing subsystem.

      We should move to unify these approaches in PersistentEntity as we already implement the identifier and property lookup there, allow store specific overrides. This also means that repository implementations could work with PersistentEntity instead of EntityInformation. As this would require more intensive refactoring, we could refactor the PersistentEntityInformation implementation to completely delegate to PersistentEntity and deprecate all related implementations of EntityInformation (the one handling Persistable etc.).

      Also, we should deprecate IsNewStrategyFactory and rather move IsNewAwareAuditingHandler onto the is-new-detection to be exposed from PersistentEntity.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: