Issue Type: Bug Bug
Affects Versions: 4.2.2
Assignee: Unassigned
Attachments: Animal.hbm.xml, Animal.java, Cat.hbm.xml, Cat.java
Created: 28/May/13 6:56 AM
Description:

union-subclass mapping generates DDL with alter table that uses parent table name instead of subclass table name for UNIQUE CONSTRAINT

Example :
[main] 2013-05-28 15:37:51,165 ERROR : HHH000389: Unsuccessful: alter table Animal add constraint UK_ANIMAL unique (NAME)
[main] 2013-05-28 15:37:51,165 ERROR : GDS Exception. 335544569. Table unknown ANIMAL

---------- Animal.hbm.xml ----------

<hibernate-mapping>
<class name="com.company.product.domain.Animal" abstract="true" lazy="true">
<id name="id" type="long" column="ID" >
<generator class="assigned"></generator>
</id>
<property name="name" type="string">
<column name="NAME" unique-key="UK_ANIMAL"/>
</property>
</class>
</hibernate-mapping>

---------- Cat.hbm.xml ----------

<hibernate-mapping>
<union-subclass table="CAT" name="com.company.product.domain.Cat" extends="com.company.product.domain.Animal" lazy="true">
<property name="color" type="string">
<column name="COLOR" />
</property>
</union-subclass>
</hibernate-mapping>

Environment: Jdk 1.7
Firebird 2.5
Project: Hibernate ORM
Priority: Major Major
Reporter: Aurelien DROUARD
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira