I've hit a bump using the hbm2java tool in Hibernate Tools 3.2.4.GA
I'm getting a runtime error ...
Code:
org.hibernate.AnnotationException: Unable to create unique key constraint (SYS_NC00048$) on table WRKR: SYS_NC00048$ not found
the generated entity looks like this:
Code:
@Entity
@Table(name="WRKR"
, uniqueConstraints = { @UniqueConstraint(columnNames="SYS_NC00048$"),
@UniqueConstraint(columnNames="SYS_NC00047$"),
@UniqueConstraint(columnNames="LOGIN_VAL"),
@UniqueConstraint(columnNames="SOCL_SECUR_NUM_VAL"),
@UniqueConstraint(columnNames="AD_LOGIN_VAL")}
)
public class Wrkr implements java.io.Serializable {
Interesting thing is that this data seems to be coming from the table Indexes. They read ...
Code:
Index Name Uniqueness Index Type Columns Column Expression
IX_WRKR_01 UNIQUE NORMAL WRKR_SEQ
IX_WRKR_12 UNIQUE NORMAL SOCL_SECUR_NUM_VAL
IX_WRKR_16 UNIQUE FUNCTION-BASED NORMAL SYS_NC00047$ UPPER("AD_LOGIN_VAL")
IX_WRKR_17 UNIQUE FUNCTION-BASED NORMAL SYS_NC00048$ UPPER("LOGIN_VAL")
IX_WRKR_UQ_LOGIN_VAL UNIQUE NORMAL LOGIN_VAL
IX_WRKR_UQ_AD_LOGIN_VAL UNIQUE NORMAL AD_LOGIN_VAL
WRKR_SEQ is the primary key, and SOCL_SECUR_NUM_VAL, LOGIN_VAL, and AD_LOGIN_VAL are "real" columns. The other two SYS_NC0004#$ are not actual columns in the table. They seem to be some sort of "function-based" Oracle columns.
Is there a way for me to keep those constraints from being generated? Perhaps via some hibernate.reveng.xml configuration?
I tried:
Code:
<table name="WRKR">
<column name="SYS_NC00047$" exclude="true"/>
<column name="SYS_NC00048$" exclude="true"/>
</table>
but it didn't help.
Thanks,
Steve Maring
Tampa, FL