Hello,

I have a pom.xml file with a filter for some data source properties.

The filter works for the data source properties, that is, for:

hibernate.dialect=org.hibernate.dialect.HSQLDialect
dataSource.driverClassName=org.hsqldb.jdbcDriver
dataSource.url=jdbc:hsqldb:mem:testdb
dataSource.username=sa
dataSource.password=

and my integration test is successful.

But when having also the following property in the filter file

hibernate.hbm2ddl.auto=create

I get an error message saying the sql statement could not be performed
because the table does not exist.

What happens is that HSQLDB (in memory) does not create my table before
running the test, if the hibernate.hbm2ddl.auto is in the filter file
instead of being hard coded in the spring hibernate factory bean.

But the property hibernate.dialect does not pose such a problem. It is
happily replaced by the value in the filter file.

I would like to have the property hibernate.hbm2ddl.auto being replaced by
the value in the filter file, so as to have a different value, when running
the integration test in HSQLDB (value should be create) and when running in
production (value should be validate).

http://old.nabble.com/file/p28504415/spring-hibernate.xml
spring-hibernate.xml 
http://old.nabble.com/file/p28504415/data-source.properties
data-source.properties  http://old.nabble.com/file/p28504415/pom.xml pom.xml 

-- 
View this message in context: 
http://old.nabble.com/Maven-filter-and-hsqldb-mem-hibernate.hbm2ddl.auto-tp28504415p28504415.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to