Hibernate version: 3.2.5
Hi,
I have an hbm file which contains hierarchy of several classes using <union-subclass> while only the concrete classes are abstract=false.
The top class in the hierarchy has a property which is indexed (index="i_1").
The depth of the hierarchy is about 6 classes which as I mentioned before only the concrete classes have tables.
The problem I'm facing is that hibernate generates the name of the index by concatenating all tables name in the hierarchy and in the and adding the name I specified for it.
For example: Assume the hierarchy is:
<class=Class1 abstract=true>
<property name="archived" column="Archived" type="boolean" index="i_1"/>
<union-subclass name=Class2 abstract=true>
<union-subclass name=Class3 abstract=true>
<union-subclass name=Class4 abstract=true>
<union-subclass name=Class5 abstract=true>
<union-subclass name=Class6 abstract=false>
</union-subclass>
</union-subclass>
</union-subclass>
</union-subclass>
</union-subclass>
</class>
I declared the index for a property inside Class1.
Hibernate generates the index name to be:
"Class1Class2Class3Class4Class5Class6i_1"
The problem is that this name is too long and the index is not being created!!!
How can I tell hibernate to disable this auto generated index name and use only the name I specified (e.g. "i_1").
I will really appreciate any help,
Thanks,
Iram
_________________ Iram Lewinger
Software Engineer
Cisco
|