Documentation for a newer release is available. View Latest

DPS v1 Database Compatibility

DPS v2 is backward compatible with v1, allowing it to handle settings created with DPS v1 without any DB migration. The compatibility module can deserialize the v1 DB data structure to v2. It is necessary to configure DPS v2 with information on how to convert the v1 data structure to v2 for each setting definition.

An example of the compatibility configuration can be seen here:

ipf.dps.settings.dpssample {
  type-mapping {
    from-type = "com.iconsolutions.ipf.dynamicsettings.repository.DpsSampleSettings",
    to-type = "com.iconsolutions.ipf.dynamicsettings.v2.repository.mongo.entity.SettingDocumentV1",
    payload-type = "com.iconsolutions.ipf.dynamicsettings.domain.DpsSample",
  }
}

In this example, it is configured to map:

  • the v1 setting-specific repository model com.iconsolutions.ipf.dynamicsettings.repository.DpsSampleSettings

  • to the v1 compatibility repository model (which is no longer setting-specific and is used for all v1 settings) com.iconsolutions.ipf.dynamicsettings.v2.repository.mongo.entity.SettingDocumentV1

  • the setting payload is mapped to the setting definition class (which can remain the same as it used to be) com.iconsolutions.ipf.dynamicsettings.domain.DpsSample