HHH-8821 Scanning for META-INF/orm.xml does not work on Windows in jpa
mode
This commit is contained in:
parent
bd0892a87d
commit
e3040599f1
|
@ -59,12 +59,13 @@ public class NonClassFileArchiveEntryHandler implements ArchiveEntryHandler {
|
|||
|
||||
@SuppressWarnings("SimplifiableIfStatement")
|
||||
private boolean acceptAsMappingFile(ArchiveEntry entry, ArchiveContext context) {
|
||||
if ( entry.getName().endsWith( "hbm.xml" ) ) {
|
||||
if ( entry.getNameWithinArchive().endsWith( "hbm.xml" ) ) {
|
||||
return scanOptions.canDetectHibernateMappingFiles();
|
||||
}
|
||||
|
||||
// todo : should really do this case-insensitively
|
||||
if ( entry.getName().endsWith( "META-INF/orm.xml" ) ) {
|
||||
// use getNameWithinArchive, not getName -- ensure paths are normalized (Windows, etc.)
|
||||
if ( entry.getNameWithinArchive().endsWith( "META-INF/orm.xml" ) ) {
|
||||
if ( context.getPersistenceUnitDescriptor().getMappingFileNames().contains( "META-INF/orm.xml" ) ) {
|
||||
// if the user explicitly listed META-INF/orm.xml, only except the root one
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue