Does Hibernate Support it correctly ? Because i've been searching the web for examples and even in the hibernate's site I haven't found nothing with the int type, all example uses string type...
I tried this in my table per class mapping XML file....
Code:
<discriminator column="code" type="int" />
...
<subclass name="MySubClass" extends="MyParentClass" discriminator-value="1" >
<property name="..." column="..." />
<property name="..." column="..."/>
</subclass>
for no success, the stack trace shows this error:
org.hibernate.MappingException: Could not format discriminator value to SQL string
i've changed the database to varchar and the <discriminator-value> to a string value (like CARD,CHECK).... and used type="string" and everything was fine.....but when i try to use int (making the necessary changes of course) this error occurs....
can somebody give me tip or clue???
Thanks in advance!!
[/code]