improve exception message
This commit is contained in:
parent
6a72952057
commit
3da745e62b
|
@ -333,7 +333,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector,
|
|||
if ( matchingPersistentClass != null ) {
|
||||
throw new DuplicateMappingException(
|
||||
String.format(
|
||||
"The [%s] and [%s] entities share the same JPA entity name: [%s], which is not allowed",
|
||||
"Entity classes [%s] and [%s] share the entity name '%s' (entity names must be distinct)",
|
||||
matchingPersistentClass.getClassName(),
|
||||
persistentClass.getClassName(),
|
||||
jpaEntityName
|
||||
|
|
|
@ -39,7 +39,7 @@ public class DuplicateEntityNameTest extends BaseCoreFunctionalTestCase {
|
|||
fail("Should throw DuplicateMappingException");
|
||||
}
|
||||
catch (DuplicateMappingException e) {
|
||||
assertEquals( "The [org.hibernate.orm.test.entityname.DuplicateEntityNameTest$Purchase1] and [org.hibernate.orm.test.entityname.DuplicateEntityNameTest$Purchase2] entities share the same JPA entity name: [Purchase], which is not allowed", e.getMessage() );
|
||||
assertEquals( "Entity classes [org.hibernate.orm.test.entityname.DuplicateEntityNameTest$Purchase1] and [org.hibernate.orm.test.entityname.DuplicateEntityNameTest$Purchase2] share the entity name 'Purchase' (entity names must be distinct)", e.getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue