Tool versions:
JDK 1.5.0_04
Hiberate Tools 3.1.0beta5
Eclipse 3.1.2
I'm using Hibernate Tools to reverse engineer tables into hbm and java files. When I specify a class name for a table in reveng.xml, the generated HBM and Java files end up in the base directory instead of in the package specified. I've tried specifying the package in the <table-filter> and in the tools reverse engineering run config. Here's a reduced version of the hibernate.reveng.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-name="SEC_.*"
package="com.teoco.common.security.model" />
<table name="SEC_ROLE" ></table>
<table name="SEC_USERS" class="User"></table>
</hibernate-reverse-engineering>
Running the hibernate code generation on this file sends the "User" files to the default package (no package) while the SecRole files are sent to the specified package. Generated files excerpts: [imports removed below]
Code:
// default package
// Generated Jun 19, 2006 1:15:42 PM by Hibernate Tools 3.1.0.beta5
/**
* User generated by hbm2java
*/
public class User implements java.io.Serializable {
and
Code:
package com.teoco.common.security.model;
// Generated Jun 19, 2006 1:15:42 PM by Hibernate Tools 3.1.0.beta5
/**
* SecRole generated by hbm2java
*/
public class SecRole implements java.io.Serializable {
Any suggestions? Is this known? Didn't find it in the forum.
Thanks,
Vick