|
For testing purposes, it would be helpful if properties defined in persistence.xml could be overridden by system properties or similar.
The primary use-case for me is to use a different database engine (and hence a different hibernate.dialect) while performing integration testing.
Perhaps the solution in http://tomee.apache.org/configuring-persistenceunits-in-tests.html could be borrowed: if I have a persistence unit named "myPU", I could set the system property "myPU.hibernate.dialect=org.hibernate.dialect.HSQLDialect" to override hibernate.dialect for that persistence unit while testing.
|