Hi,
I have a hibernate mapping here that works perfectly fine with mysql and MS SQL server, but when I try to create the database structure in a postgresql database it fails. I looks like the order in which the tables are created is not right, the errors I get are at the end of the post. Any idea how to get either more information as to what hibernate tried to execute, or how to fix this? If the mapping is needed I can post it, but as its not really small for now I leave it out (as it works with 2 other databases).
Code:
java.sql.SQLException: ERROR: relation "description" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:392)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:264)
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:61)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:308)
at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:284)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:186)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
at de.zgdv.rostock.ceisexpert.hibernate.HibernateUtil.buildDatabase(HibernateUtil.java:50)
at de.zgdv.rostock.ceisexpert.hibernate.HibernateUtil.main(HibernateUtil.java:184)
java.sql.SQLException: ERROR: relation "instruction" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:392)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:264)
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:61)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:308)
at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:284)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:186)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
at de.zgdv.rostock.ceisexpert.hibernate.HibernateUtil.buildDatabase(HibernateUtil.java:50)
at de.zgdv.rostock.ceisexpert.hibernate.HibernateUtil.main(HibernateUtil.java:184)