eclipselink
eclipselink copied to clipboard
EntityManagerSetupImpl uses invalid merging of properties by map
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...