【发布时间】:2013-04-28 02:40:04
【问题描述】:
我正在使用休眠 POJO 类和映射访问 Postgresql 数据库。现在我添加了一个名为“OCS”的新模式,但无法生成类和映射。这是我的 hibernate.cfg.xml
<property name='hibernate.connection.driver_class'>org.postgresql.Driver</property>
<property name='hibernate.connection.url'>jdbc:postgresql://test/test_mytest</property>
<property name='hibernate.connection.username'>username</property>
<property name='hibernate.connection.password'>password</property>
<property name='hibernate.connection.pool_size'>10</property>
<property name='show_sql'>true</property>
<property name='dialect'>org.hibernate.dialect.PostgreSQLDialect</property>
【问题讨论】:
-
您可以更改 Postgres 用户以将
ocs设为默认架构。
标签: hibernate postgresql schema