Issue with MergePersistenceUnitManager in 2.0.0-GA
Posted: Wed Oct 10, 2012 5:47 pm
Hi,
I am trying to understand the reason for the following code fragment from MergePersistenceUnitManager line 83
for (String legacyLocation : tempLocations) {
if (!legacyLocation.endsWith("/persistence.xml")) {
//do not add the default JPA persistence location by default
mergedPersistenceXmlLocations.add(legacyLocation);
}
}
It seems that this excludes any value from persistenceXmlLocations property that contains "persistence.xml" in it. Why is this necessary?
I am having an issue with that. I have an existing JPA descriptor that allows and access to a different database and it has a default name persistence.xml. This code snippet prevents me from using MergePersistenceUnitManager to initialize persistence units in that descriptor. Previously it worked with version 1.5.4
I am trying to understand the reason for the following code fragment from MergePersistenceUnitManager line 83
for (String legacyLocation : tempLocations) {
if (!legacyLocation.endsWith("/persistence.xml")) {
//do not add the default JPA persistence location by default
mergedPersistenceXmlLocations.add(legacyLocation);
}
}
It seems that this excludes any value from persistenceXmlLocations property that contains "persistence.xml" in it. Why is this necessary?
I am having an issue with that. I have an existing JPA descriptor that allows and access to a different database and it has a default name persistence.xml. This code snippet prevents me from using MergePersistenceUnitManager to initialize persistence units in that descriptor. Previously it worked with version 1.5.4