hibernate mappings discriminator


i have list domain indicate unfamiliar pivotal 3 tables formed descriminator value (project, timekeep, costcenter. wholly implemented subclasses, i am wondering i have next work. note subclass name same progenitor category noteobject ability mapped an instance non-static form java.lang.object should accept presumably project, timekeep costcenter vigilant enlarged ban repremand type. hibernate grant this? thanks.



<hibernate-mapping package="com.tlr.finance.mappings">

<class name="adminnotes" table="admin_notes">
<id name="adminnoteid" column="admin_note_id" type="integer">
<generator class="identity" />
</id>

<discriminator column="note_type" type="string" />

<!-- ability an enumerated type. discriminator -->
<property name="adminnotetype" column="note_type" type="string" not-null="true" />
<property name="adminnote" column="note" type="string" not-null="true" />
<property name="adminnoteadded" column="note_date" type="timestamp"
not-null="true" />

<subclass name="adminnotes" discriminator-value="project" >
<many-to-one name="noteobject" column="object_id" class="psdata" /><!-- digest -->
</subclass>

<subclass name="adminnotes" discriminator-value="user" >
<!-- rename timekeep user -->
<many-to-one name="noteobject" column="object_id" class="timekeep" /><!-- user -->
</subclass>

<subclass name="adminnotes" discriminator-value="costcenter" >
<!-- rename timekeep user -->
<many-to-one name="noteobject" column="object_id" class="costcenter" /><!-- cost core -->
</subclass>

</class>

</hibernate-mapping>


Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?