]
Stephen Cooper commented on HBX-730:
------------------------------------
Looks like a duplicate of HHH-1853.
there's a patch there for this issue.
SchemaExport with hibernate.hbm2ddl.auto does not create database
schemas before it creates tables (fails with invalid schema name: on HSQLDB)
-----------------------------------------------------------------------------------------------------------------------------------------------
Key: HBX-730
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-730
Project: Hibernate Tools
Issue Type: Improvement
Environment: Hibernate 3.0.5, HSQLDB 1.8
I've also read the code in the SchemaExport, Table and Configuration classes in
3.2rc3 and it looks like this hasn't been added in 3.1 or 3.2.
Reporter: Andrew Thompson
I'm writing a unit test that creates the database it will work with using
hibernate.hbm2ddl.auto=create-drop.
This all works fine, so long as I don't use schemas in my .hbm.xml:
<class name="com.example.Foo" table="foo_table">
If I add a schema like this, then the database creation fails on HSQLDB 1.8:
<class name="com.example.Foo" schema="bar"
table="foo_table">
Unsuccessful: create table bar.foo_table ( ... column names ... )
hbm2ddl.SchemaExport - invalid schema name: BAR in statement [create table
bar.foo_table]
As far as I know there is no way to ask Hibernate to create the schema before it tries to
create the tables.
There is a forum thread here that shows I am not the only one with this issue:
http://forum.hibernate.org/viewtopic.php?p=2316411&sid=c0cd248a87bfb8...
As this is a unit test, precreating the schema in the test code is plausible, but not
particularly attractive.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: