databasesap-commerce-clouddatamodelcommerce

hybris - one to many and many to many relationship


In our production sytem, we have an existing relationship which is one to many. We would like to change this relationship to many to many due to business/data reasons.

What steps we need to take without loosing data and with no impact to production data, as we need to change *-items.xml file within hybris system.

Appreciate your inputs.

Thanks!


Solution

  • The database structure for one-to-many and many-to-many is different. One-to-many records uses 1 table (the many records are saved in the one table), but many-to-many uses an extra table.

    I suggest to export existing data, update the items.xml (with platform update), and reimport the data.