Hi there,
I would like to know if can I update a class between classes that are using discriminator value.
So, I have a Administrator class, Analyst class and User class and I would like to do a cast from Administrator class for Analyst class for example. How can I to do it?
Is it possible?
Code:
<class name="User" table="users" discriminator-value="0">
<id name="id" type="string" column="id"/>
<many-to-one
name="level"
column="level"
class="Level"
not-null="false"
insert="false"
update="false"
/>
<discriminator column="level" type="integer"/>
<subclass name="Analyst" discriminator-value="1"/>
<subclass name="Administrator" discriminator-value="2">
<property
name="email"
column="email"
type="java.lang.String"
not-null="true"
length="50"
/>
</subclass>
</class>
How Would I cast Administrator for Analyst?
Thx a lot