<table cellspacing='0' cellpadding='0' border='0' background='none' style='font-family:arial;font-size:10pt;color:rgb(51, 51, 51);background-color:rgb(255, 255, 255);width:100%;'><tr><td valign='top' style='font: inherit;'>Max, <br><br>Thanks for your reply. Comments inline.<br><br>> Secondly, even though I have defined the<br>>HibernateReverseEngineeringStrategy, why tools is generating pojos and mapping<br>>files for all the tables in the db ? (Note:I have listed only selected tables<br>>in the hibernate.reveng.xml).<br><br>>Not sure - depends what your customer reverse engineeringst rategy does.<br><br>I am using the default reverse engineering strategy. Here is the code:<br><br> cfg = new JDBCMetaDataConfiguration();<br> OverrideRepository or = new
OverrideRepository();<br> Configuration c = cfg.configure(confFile); // hibernate.cfg.xml<br> or.addFile(revengFile); // hibernate.reveng.xml<br> DefaultReverseEngineeringStrategy strategy = new <br> DefaultReverseEngineeringStrategy();<br>
settings = new ReverseEngineeringSettings(strategy);<br> settings.setDefaultPackageName(helper.getPackageName()); // sets package name<br> strategy.setSettings(settings);<br> cfg.setReverseEngineeringStrategy(strategy);<br> cfg.readFromJDBC();<br><br><br>And the hibernate.reveng.xml is <br><br><?xml version="1.0" encoding="UTF-8"?><br><!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd"><br><hibernate-reverse-engineering><br> <table-filter
exclude="false" match-catalog=".*" match-name="HOTEL" match-schema="TRAVEL"/><br> <table-filter exclude="false" match-catalog=".*" match-name="PERSON" match-schema="TRAVEL"/><br> <table-filter exclude="false" match-catalog=".*" match-name="TRIP" match-schema="TRAVEL"/><br> <table-filter exclude="false" match-catalog=".*" match-name="TRIPTYPE" match-schema="TRAVEL"/><br></hibernate-reverse-engineering><br><br><br>Only 4 tables are selected as part of the hibernate.reveng.xml. But pojos and mappings are generated for all the tables in the TRAVEL db. Also the selected 4 tables are not dependent on the other tables in the schema.<br><br>Is it possible pojo generator/mapping generator is reading all the tables in the schema and ignoring the "selected" tables defined in reveng.xml. And hence creating the additional java and mapping files. <br><br>I would appreciate if you can tell me what I am
missing.<br><br>Thanks - G<br><br><br><br></td></tr></table><br>