|
First, we do not apply the XSD as we parse the XML, so any default that would or would not have been applied per the XSD is not. Instead we handle that programatically.
I completely disagree that omitted and empty are semantically any different. A "default" talks as much about the semantics of the thing...
Also, all spec versions are actually quite consistent that the intent is such that scanning (or searching if you prefer that term) should happen by default in EE environments. It specifically calls out that exclude-unlisted-classes element "is not intended for use in Java SE environments" (thats quote from JPA 1.0 spec). In fact, in SE environments it is up to the provider whether they want to provide scanning (which Hibernate does via a separate config option).
The class you are patching is used to read XML files in SE environments. In EE environments read/parse the XML and hand it to use as a javax.persistence.spi.PersistenceUnitInfo.
I agree the version specific default is incorrect. It should default to true in all versions and in all environments. The difference is what that "means"
|