-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: nested-composite-element problem
PostPosted: Wed Dec 15, 2004 9:34 am 
Newbie

Joined: Wed Dec 15, 2004 9:14 am
Posts: 4
Hi,

I would like to model a contract, with a revisable archived state (ie one or more state per contract). Each state itself may relate to one or more future financial operations. A state without its contract, as a future financial operation without its related state, means nothing. So the composition appears to be a good choice.

The following mapping is what I try. The schema generator issues a MappingException
(could not find class: void). What's wrong with this mapping ?

Thanks in advance for any help.

Loïc

In Contrat.hbm.xml :
Code:
<list name="etats" lazy="true">
    <key column="idContrat" />
    <index column="date" />

    <composite-element class="contrat.EtatContrat">
        <property name="date" type="java.util.Date" update="true" insert="true"           column="date" not-null="true" />
        <many-to-one name="contrat" class="contrat.Contrat" cascade="none" outer-join="auto"
        update="true" insert="true" column="idContrat" not-null="true" />
        <nested-composite-element class="contrat.FluxFinancier" name="fluxFinanciersFuturs">
            <property name="dateEcheance" type="java.util.Date" update="true" insert="true" column="dateEcheance"
            not-null="true" />
            <property name="montant" type="java.math.BigDecimal" update="true" insert="true" column="montant"
            not-null="true" />
            <many-to-one name="etatContrat" class="contrat.EtatContrat" cascade="none"
            outer-join="auto" update="true" insert="true" column="idEtatContrat" not-null="true" />
        </nested-composite-element>
    </composite-element>
</list>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.