使用Hibernate工具,以扭转从Postgres的工程师的POJO
-
18-09-2019 - |
题
我想逆向工程的POJO(使用Hibernate工具在Eclipse 3.4.2插件v3.2.4x)从我的Postgres创建,但我的表被忽略的数据库。如果我指定“公共”作为我的hibernate.cfg.xml文件中的“hibernate.default_schema”属性的值,但如果我尝试指定一个不同的模式,则生成没有它的工作原理。
我试着修改的情况下(即下限,上限,骆驼),但我仍然获得相同的结果。这里是我的hibernate.cfg.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="MyFactory">
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.password">[mypassword]</property>
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/testgis</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.default_schema">locatimus</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
</session-factory>
</hibernate-configuration>
下面是我在的pgAdmin III设置的图片 - http://twitpic.com/snj8i
我敢肯定,我做(或失踪)的东西容易。正如我说的,如果我在该模式中的所有表,将模式改为公共然后POJO是产生!
谁能帮助?
非常感谢, 达米安
解决方案
行,我发现这个问题。看来,表名必须为小写或休眠工具并没有看到他们。我不知道如果这与PostgreSQL的方言中的错误的Hibernate本身。
其他提示
是否postgres用户必须在locatimus架构权限表?
不隶属于 StackOverflow