hibernate - Specify Postgresql datasource default schema in JBoss -
i've setup datasource on jboss connect eap 6.2 postgresql 9.3.2. i'm using postgresql-9.3-1100.jdbc4.jar
driver. connects when using test connection button in jboss admin console.
when trying connect (query/persist) entity via java gives me following error:
org.postgresql.util.psqlexception: error: relation "student" not exist
i've added following line in persistence.xml include schema
<property name="hibernate.default_schema" value="archu"/>
but error includes schema:
org.postgresql.util.psqlexception: error: relation "archu.student" not exist
i've queried database via netbeans , works modifying "archu.student" archu."student".
in database table student spelled using uppercase s jboss datasource uses lowercase. jboss datasource appends schema "" around archu , student doesn't want work.
is there better way specify schema in datasource , tell datasource not make lowercase?.
i have ask hibernate drop , create tables me.
persistence.xml entry:
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
with following enabled can see difference is.
the table gets created name "student" lowercase though entity named student" uppercase s.
it works combination of newly created table via hibernate , entry of schema in persistence.xml.
Comments
Post a Comment