Hibernate: insert into MyBaseObject (id, DTYPE) values (default, 'one')
Hibernate: insert into MyChildObject1 (id) values (?)
Hibernate: insert into MyBaseObject (id, DTYPE) values (default, 'two')
Hibernate: insert into MyChildObject2 (id) values (?)
Hibernate: select this_.id as id2_0_0_, this_.DTYPE as DTYPE1_0_0_ from MyBaseObject this_ left outer join MyChildObject1 this_1_ on this_.id=this_1_.id left outer join MyChildObject2 this_2_ on this_.id=this_2_.id where case when this_1_.id is not null then one when this_2_.id is not null then two when this_.id is not null then 'MyBaseObject' end=? and (this_.id=? or this_.id=?) limit ?
org.hibernate.exception.SQLGrammarException: could not prepare statement
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:82)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124)
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:193)
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:157)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1881)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1858)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838)
at org.hibernate.loader.Loader.doQuery(Loader.java:906)
...
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: ONE
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:159)
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:183)
... 50 more
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: ONE