The documentation indicates that you can filter the schemas you reverse engineer by using a hibernate.reveng.xml file.
Here is the example in the docs:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<type-mapping>
<sql-type jdbc-type="VARCHAR" length='20' hibernate-type="SomeUserType" /> <!-- jdbc-type is name fom java.sql.Types -->
<sql-type jdbc-type="VARCHAR" length='1' hibernate-type="yes_no" />
<sql-type jdbc-type="NUMERIC" precision='1' hibernate-type="boolean" /> <!-- length, scale and precision can be used to specify the mapping precisly -->
<sql-type jdbc-type="NUMERIC" hibernate-type="long" /> <!-- the type-mappings are ordered. This mapping will be consulted last, thus overriden by the previous one if precision=1 for the column -->
</type-mapping>
<table-filter match-name="BIN$.*" exclude="true" /> <!-- BIN$ is recycle bin tables in Oracle -->
<table-filter match-name="DoNotWantIt" exclude="true" /> <!-- Exclude DoNotWantIt from all catalogs/schemas -->
<table-filter match-catalog="BAD" match-schema="SCHEMA" match-name=".*" exclude="true" /> <!-- exclude all tables from the schema SCHEMA in catalog BAD. -->
</hibernate-reverse-engineering>
It looks like you can specify tables/schemas to exclude. Can you use the reverse logic as well? For example, only reverse engineer the tables in the MY_APP_SCHEMA? The documentation on the hibernate.reveng.xml does not go into a lot of detail.
Regards,
Joshua