Class ReferenceValuesSupport

java.lang.Object
io.jmix.core.impl.ReferenceValuesSupport

@NullMarked @Component("core_ReferenceValuesSupport") public class ReferenceValuesSupport extends Object
Removes initial values from an instance returned by UnconstrainedDataManager.getReference(Class, Object) and from its copies.
See Also:
  • Field Details

    • metadata

      @Autowired protected Metadata metadata
    • metadataTools

      @Autowired protected MetadataTools metadataTools
  • Constructor Details

    • ReferenceValuesSupport

      public ReferenceValuesSupport()
  • Method Details

    • clearInitialValues

      public void clearInitialValues(Object entity)
      Sets to null, directly in the fields, the values assigned when the instance was created, so that a later set of any value fires a change event and marks the attribute loaded.

      Keeps the primary key, JmixGeneratedValue values (equals() and hashCode() can depend on them), embedded instances and element collections (entity code can expect them to be not null).