[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1853?page=c...
]
tom quas commented on HHH-1853:
-------------------------------
I prepared a patch against the 3.2 branch that solves this problem for our environment,
namely H2, PostgreSQL, and SQL Server 2005. Note that I could not make it work with
Hypersonic/HSQL since its CREATE SCHEMA statement requires a mandatory AUTHORIZATION part
that I didn't want to deal with at this point. Somebody else might know how to fix
this problem in an efficient way. Anyway, H2 gave our test suite a tremendous boost, so
dropping HSQL was the logical step and we're happy.
See attachment create-schema.patch
CREATE SCHEMA inside database-object need to execute before tables
are created
------------------------------------------------------------------------------
Key: HHH-1853
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1853
Project: Hibernate3
Type: Improvement
Versions: 3.1.3
Environment: hsqldb 1.8.0
Reporter: Mattias Jiderhamn
Priority: Minor
In order to have Hibernate create database schemas for hsqldb, you have to insert a
<database-object> in your mapping file
(
http://forums.hibernate.org/viewtopic.php?p=2305138). Problem is, all the database-object
statements are executed after the tables are created, so tables in non-default schemas
will not be created. To get around this, you have to first use
Configuration.generateSchemaCreationScript() to get the schemas, and then
Configuration.generateSchemaUpdateScript() to get the tables inside the schemas.
(This is a bit problematic when using Springs LocalSessionFactoryBean)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira