Hibernate version: 3.0rc1
Hello,
I have been trying to use a composite key which has, among its key properties, a user defined type that requires parameters. So, hypothetically, I'd like my mapping file to look something like:
Code:
<class name="Senator" table="us_senate">
<composite-id>
<key-property name="state">
<type name="EnumUserType">
<param name="enumClassName">State</param>
</type>
</key-property>
<key-property name="rank"/>
</composite-id>
...
</class>
Unfortunately, the mapping DTD doesn't seem to allow these kinds of nested type elements and, as far as I know, I can't toss parameters into a type attribute. I was wondering if I was missing something about why Hibernate doesn't support such a thing.
Any elucidation would be greatly appreciated. To be honest, I'm after understanding more than I'm after a workaround here.