Joined: Tue Oct 28, 2003 8:00 am Posts: 16 Location: Karlsruhe, Germany
|
hi,
we use a CompositeUserType and have problems in some
of our persistent classes.
I get the Exception
net.sf.hibernate.MappingException: No persister for:
xxx.app.vo.C6Betrag within net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:342)
when I try to session.save an object of class LebenshaltungskostenVO
which contains properties of a CompositeUserType C6Betrag.
I think we need no mapping for C6Betrag and no persister class and
we use this CompositeUserType in other classes without problems (eg in LebenshaltungskostentabelleVO)
Why do I get this exception in this case ?
our mapping is
LebenshaltungskostenVO
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="xxx.app.vo.LebenshaltungskostenVO"
table="LEBENSHALTUNGSKOSTEN"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="VOID"
type="string"
length="32"
unsaved-value="null"
>
<generator class="uuid.hex">
</generator>
</id>
<property
name="mehrverdienst"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="MVERDBTR"
/>
<column
name="MVERDWHG"
length="3"
/>
</property>
<property
name="pauschalKosten1"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="PAUSCH1BTR"
/>
<column
name="PAUSCH1WHG"
length="3"
/>
</property>
<property
name="pauschalKosten2"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="PAUSCH2BTR"
/>
<column
name="PAUSCH2WHG"
length="3"
/>
</property>
<property
name="pauschalKosten3"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="PAUSCH3BTR"
/>
<column
name="PAUSCH3WHG"
length="3"
/>
</property>
<property
name="pauschalKosten4"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="PAUSCH4BTR"
/>
<column
name="PAUSCH4WHG"
length="3"
/>
</property>
<property
name="pauschalKostenWeitere"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="PAUSCHWBTR"
/>
<column
name="PAUSCHWWHG"
length="3"
/>
</property>
<list
name="tabelle"
lazy="false"
inverse="false"
cascade="all"
>
<key
column="LHK_ID"
/>
<index
column="LHKTAB_ID"
type="integer"
/>
<one-to-many
class="xxx.app.vo.LebenshaltungskostentabelleVO"
/>
</list>
<property
name="zuschlag"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="ZUSCHLAG"
/>
<column
name="ZUSCHLAGWHG"
length="3"
/>
</property>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="xxx.app.vo.LebenshaltungskostentabelleVO"
table="LHKTABELLE"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="VOID"
type="string"
length="32"
unsaved-value="null"
>
<generator class="uuid.hex">
</generator>
</id>
<timestamp
name="aenderungszeitpunkt"
column="TIME_MODIFIED"
/>
<property
name="betrag"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="BTR"
/>
<column
name="BTRWHG"
length="3"
/>
</property>
<property
name="kosten1"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="KS1BTR"
/>
<column
name="KS1WHG"
length="3"
/>
</property>
<property
name="kosten2"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="KS2BTR"
/>
<column
name="KS2WHG"
length="3"
/>
</property>
<property
name="kosten3"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="KS3BTR"
/>
<column
name="KS3WHG"
length="3"
/>
</property>
<property
name="kosten4"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="KS4BTR"
/>
<column
name="KS4WHG"
length="3"
/>
</property>
<property
name="kostenWeitere"
type="xxx.app.vo.C6Betrag"
update="true"
insert="true"
>
<column
name="KSWBTR"
/>
<column
name="KSWWHG"
length="3"
/>
</property>
</class>
</hibernate-mapping>
|
|