[英]Hibernate plugin reverse engineering with Oracle
我正在嘗試使用hibernate3-maven-plugin
從Oracle模式中獲取Pojos。
我的問題是,盡管我在hibernate.properties文件中指定了要連接並獲取pojos的用戶,但插件仍繼續獲取系統表實體,而不是從我創建的虛擬表中獲取實體。
所以一個問題可能是該用戶具有sys dba憑據,但事實並非如此,我什至無法從該oracle用戶創建表...
hibernate.properties
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.url=jdbc:oracle:thin:@localhost:1521/ORACLE
hibernate.connection.username=DROOLS
hibernate.connection.password=drools
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
reveng.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC
"-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<schema-selection match-schema="DROOLS"/>
</hibernate-reverse-engineering>
Maven插件配置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<hibernatetool>
<jdbcconfiguration/>
</hibernatetool>
</configuration>
<dependencies>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>oracle.jdbc.driver</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
</dependencies>
</plugin>
任何幫助表示贊賞。 謝謝!
問題是我沒有在hibernate.properties中指定實際的模式,即使在oracle中用戶基本上是一個模式...
hibernate.default_schema=DROOLS
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.