You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling datastore.getMapper().getEntityModel(ThirdPartyEntityMixIn.class), the entity model of ThirdPartyEntity is returned correctly the first time. However, on the second call, getEntityModel fails due to a duplicated discriminator error: Two entities have been mapped using the same discriminator value (com.example.ThirdPartyEntityMixIn): com.example.ThirdPartyEntity and com.example.ThirdPartyEntity
Cause
The issue occurs because when entities are being put into mappedEntities, the key used is entityModel.getType(), which refers to ThirdPartyEntity.class. But when retrieving the model in getEntityModel, the key used is ThirdPartyEntityMixIn.class, leading to a conflict when Morphia attempts to register the entity again.
Morphia Version:
2.4.4
The text was updated successfully, but these errors were encountered:
Description
Suppose we have the following:
and
When calling datastore.getMapper().getEntityModel(ThirdPartyEntityMixIn.class), the entity model of ThirdPartyEntity is returned correctly the first time. However, on the second call, getEntityModel fails due to a duplicated discriminator error:
Two entities have been mapped using the same discriminator value (com.example.ThirdPartyEntityMixIn): com.example.ThirdPartyEntity and com.example.ThirdPartyEntity
Cause
The issue occurs because when entities are being put into mappedEntities, the key used is entityModel.getType(), which refers to ThirdPartyEntity.class. But when retrieving the model in getEntityModel, the key used is ThirdPartyEntityMixIn.class, leading to a conflict when Morphia attempts to register the entity again.
Morphia Version:
2.4.4
The text was updated successfully, but these errors were encountered: