There are hardware assets that have their entry on the 'alm_hardware' table. (for e.g., A1)
There are contracts that have their entry on the 'ast_contract' table. ( for e.g., C1 & C2)
Each time we associate an asset to a contract, it creates a relationship on the 'clm_m2m_contract_asset' table.
The expected behavior is, two records should be created on the above table, with A1->C1 && A1->C2 relationship.
The actual behavior is, each time we associate an asset to contract, the latest Contract ID (C2) replaces the existing Contract ID(C1).Open any asset from the alm_hardware table.Look at its 'Assets Covered' related list under 'Contract' tab. We can see an asset is associated with a contract ID.
This relationship is stored in the 'clm_m2m_contract_asset' table.
Below are the steps to reproduce
1)Open any other contract from Contracts > Maintenance.
2)From its 'Assets Covered' related list, click on 'Edit an add an asset different from the one you selected in step2.
3)A new record in clm_m2m_contract_asset with the new relationship should be created and the existing one should still exist as per the expected behavior.
4)But the issue is the existing m2m mapping is replaced with the new asset that is being tagged to a contract ID.
OOTB Record which establishes the many to many relationships, 'clm_m2m_contract_asset' on the 'sys_m2m' table was missing on the instance. (Sys Id of the record : 25b06b5c0b033200923e15545cbd0f15)
Once the record is imported, the new m2m mappings have been added after an asset is associated to a contract.