-->
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.  [ 2 posts ] 
Author Message
 Post subject: These mappings are equivalent ?
PostPosted: Wed Feb 13, 2008 3:27 pm 
Newbie

Joined: Wed Feb 13, 2008 10:28 am
Posts: 5
These mappings are equivalent ?

Code:
<set name="ds001ProcessoFechamentos" inverse="true" table="rel_fatura_ds001_processo">
            <key>
                <column name="cod_orgao" length="12" not-null="true" />
                <column name="num_ano_fatura" precision="4" scale="0" not-null="true" />
                <column name="num_fatura" precision="7" scale="0" not-null="true" />
            </key>
            <many-to-many entity-name="br.com.dsystems.ds001.models.Ds001ProcessoFechamento" >
                <formula>cod_orgao</formula>
                <column name="num_ano_proces" precision="4" scale="0" not-null="true" />
                <column name="num_proces" precision="7" scale="0" not-null="true" />
            </many-to-many>
        </set>


Code:
<set name="ds001ProcessoFechamentos" inverse="true" table="rel_fatura_ds001_processo">
            <key>
                <column name="cod_orgao" length="12" not-null="true" />
                <column name="num_ano_fatura" precision="4" scale="0" not-null="true" />
                <column name="num_fatura" precision="7" scale="0" not-null="true" />
            </key>
            <many-to-many entity-name="br.com.dsystems.ds001.models.Ds001ProcessoFechamento" >
                <column name="cod_orgao" length="12" not-null="true" />
                <column name="num_ano_proces" precision="4" scale="0" not-null="true" />
                <column name="num_proces" precision="7" scale="0" not-null="true" />
            </many-to-many>
        </set>


The second mapping is the mapping that throws the exception:
org.hibernate.MappingException: Repeated column in mapping for collection

And the first mapping is the work arround that I find to solve the problem, but I don´t know if these two mappings are equivalent... I hope so...

They are ?

Thanks in advance
Rodrigo Kerkhoff


Top
 Profile  
 
 Post subject: more info
PostPosted: Thu Feb 14, 2008 9:15 am 
Regular
Regular

Joined: Thu Sep 22, 2005 1:53 pm
Posts: 88
Location: Rio de Janeiro
Hi!

Can you please provide a bit more info like the table struture..

_________________
Don´t forget to rate!


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

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.