eclipselink icon indicating copy to clipboard operation
eclipselink copied to clipboard

EntityManagerSetupImpl uses invalid merging of properties by map

Open laeubi opened this issue 3 years ago • 0 comments

EntityManagerSetupImpl uses a Map merge here:

https://github.com/eclipse-ee4j/eclipselink/blob/036c4cc7b131d1fd6e5cdb394b4e68bf960db285/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java#L651

The problem is, that the Properties class is implemented in a way that the Map it extended only contains the direct properties, but not the defaults.

Thus having something like new Properties(someDefaults) returned by persistenceUnitInfo.getProperties() will ignore all default values. This is really hard to track just in case...

laeubi avatar Jun 29 '22 09:06 laeubi