My hibernate reverse engineering xml -
Code:
<?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>
<table-filter match-schema="DEV42" exclude="false" package="com.encover.mapping.util" match-name="EN_BB"/>
<table-filter match-schema="DEV42" exclude="false" package="com.encover.mapping.util" match-name="EN_OBJECT_STATE"/>
<table-filter match-schema="DEV42" exclude="false" package="com.encover.mapping.util" match-name="EN_NUMERATOR"/>
<table-filter match-schema="DEV42" exclude="false" package="com.encover.mapping.util.billing" match-name="EN_CC_LOG"/>
<table-filter match-schema="DEV42" exclude="false" package="com.encover.mapping.product" match-name="EN_PRODUCT_CONFIG"/>
<table-filter match-schema="DEV42" exclude="false" package="com.encover.mapping.product" match-name="EN_PRODUCT_ROLE"/>
</hibernate-reverse-engineering>
My hibernate cfg -
Code:
<?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="hibmode">
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.password">chess</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@192.168.146.133:1521:ENC9i</property>
<property name="hibernate.connection.username">chess</property>
<property name="hibernate.default_schema">CHESS</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
</session-factory>
</hibernate-configuration>
My build.xml (relevant portions)
Code:
<taskdef
name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="hibtools.libraries"/>
<hibernatetool
destdir="/home/syermal/Projects/hibernate1/src">
<jdbcconfiguration
configurationfile="hibernate4.cfg.xml"
packagename="com.encover.model" reversestrategy="org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy"
revengfile="hibernate2.reveng.xml">
</jdbcconfiguration>
<hbm2hbmxml/>
<hbm2java/>
</hibernatetool>
The code that is generated is in the package com.encover.model and not in any subprojects. Thanks for the help.
On a side note - What is the right tool and when should one choose hibernate tool over something like middlegen/xdoclet? I was just wondering about what you have to say. We are in the mode of moving to hibernate. I was hoping there might be some best practices that could be followed.
Thanks,
Srini.