[Hibernate-JIRA] Created: (HBX-1193) reverse engineering of UniqueConstraint annotation for function-based indexes
by Steve Maring (JIRA)
reverse engineering of UniqueConstraint annotation for function-based indexes
-----------------------------------------------------------------------------
Key: HBX-1193
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1193
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2java
Affects Versions: 3.2.4.GA
Reporter: Steve Maring
getting a runtime error ...
[code]org.hibernate.AnnotationException: Unable to create unique key constraint (SYS_NC00048$) on table WRKR: SYS_NC00048$ not found[/code]
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 {[/code]
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
[/code]
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 indexes/columns that you only see in the list of indexes.
tried:
<table name="WRKR">
<column name="SYS_NC00047$" exclude="true"/>
<column name="SYS_NC00048$" exclude="true"/>
</table>
but it didn't help.
The problem seems to be isolated to the annotation generation. I would venture to say that it should NOT be generating @UniqueConstraint entries for columns that don't actually exist in the table.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[Hibernate-JIRA] Resolved: (HHH-1423) ParameterParser bug - ordinal parameter mismatch
by Strong Liu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1423?page=c... ]
Strong Liu resolved HHH-1423.
-----------------------------
Resolution: Out of Date
I think this is fixed in 4.0, please give it a try, if it doesn't, then please create a new one, link this to the new one, and a test case please
thanks
> ParameterParser bug - ordinal parameter mismatch
> -------------------------------------------------
>
> Key: HHH-1423
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1423
> Project: Hibernate Core
> Issue Type: Bug
> Components: query-hql
> Affects Versions: 3.1.2
> Environment: Windows XP SP2, JDK 1.5.0_06-b05, Spring 1.2.6, antlr-2.7.6rc1
> Reporter: Artur Wronski
> Assignee: Strong Liu
> Priority: Critical
> Attachments: HHH1423Test.java, ParameterParser.2.patch, ParameterParser.3.patch, ParameterParser.patch, RecognizerBug.java
>
>
> There is still problem with ParameterParser. The same was in Hibernate 3.1.1
> Runnable TestCase in attachment.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months