|
We have a table that is mapped more than once.
If the two mappings doesn't use the mechanisms of inheritance, then there is no problem.
But if one of mappings have a TABLE_PER_CLASS inheritance, the behavior depends on the order of addition of entities.
I added a sample project to better understand the problem :
ComplexDuplicateEntity and SimpleEntity are mapped on the same table.
SimpleEntity is a very simple entity without any inheritance
ComplexDuplicateEntity is a leaf on a TABLE_PER_CLASS inheritance.
In the Configuration, if we add the complex entity before simpler then there is no exception thrown.
But if we reverse the order then a DuplicateMappingException is raised
Regards
Arnaud
Sorry for my poor English
|