Hibernate version:
3.1.3
Mapping documents:
Code:
<class name="com.example.Foo" table="foo">
<id name="id" column="id"><generator class="native"/></id>
<discriminator column="type" />
<subclass discriminator-value="com.example.FooImplSimple"
name="com.example.FooImplSimple" />
<subclass discriminator-value="com.example.FooImplComplex"
name="com.example.FooImplComplex" />
</class>
Hello
I have a database table called 'foo' with fields id (int) and type (varchar).
The contents of the table are:
1 - com.example.FooImplSimple
2 - com.example.FooImplComplex
Is there a way to improve the mapping by not having to explicitly bind each string discriminator value with the name of the class? The classname is the value of the field itself.
Thanks,
Ioannis