Hibernate prepareStatement doesn't work -
i used have url connection in hibernate.cfg.xml
file , worked fine.
<property name="connection.url">jdbc:oracle:thin:address.to.real.db</property>
now, changed url learn code locally.
<property name="connection.url">jdbc:hsqldb:mem:mock_db</property>
after change, statement below won't work anymore. throws exception saying invalid schema name: test in statement
jdbcconnection.preparestatement(parameterizedstrquery);
in hibernate mapping xml file have line of code
<hibernate-mapping schema="test">
parameterizedstrquery looks this
select obj.obj_id, test.obj obj.foo=0 , obj.var = 1 , (obj.obj_id in (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?))
how fix problem? in advance.
according http://hsqldb.org/doc/guide/databaseobjects-chapt.html#dbc_schemas_schema_objects
in hypersql, there 1 catalog per database. name of catalog public. can rename catalog alter catalog rename statement. schemas belong catalog. catalog name has no relation file name of database.
so try open mock_db
, rename catalog public
test
.
Comments
Post a Comment