Hi,
I'm using hbm2java with a base class.
Code:
<class name="com.wgh.Tenant" table="tenant" >
<meta attribute="generated-class">com.wgh.base.Tenant</meta>
<id name="tenant_id" column="tenant_id" type="long" unsaved-value="null">
<generator class="identity"/>
</id>
<many-to-one name="original_tenant_record" column="original_tenant_id" class="com.wgh.Tenant"/>
</class>
My problem is that since there is a relationship to itself, when hbm2java is run an illegal import is generated. Any suggestions how to eliminate this import?
My class:
Code:
package com.wgh.om;
public class Tenant extends com.wgh.base.Tenant {
}
Generated class:
Code:
package com.wgh.base;
import com.wgh.Tenant;
import java.io.Serializable;
import java.util.Date;
import java.util.SortedSet;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
abstract public class Tenant implements Serializable {
...
}
The line "import com.wgh.Tenant" causes cyclical inheritance. Appreciate any tips.
WILL