-->
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.  [ 3 posts ] 
Author Message
 Post subject: Mapping error
PostPosted: Tue Jun 30, 2009 11:11 am 
Newbie

Joined: Tue Jun 30, 2009 11:03 am
Posts: 2
Hi,

I've got this strange mapping error when I execute my application with NHibernate (v 2.0.1) under VS 2008 :
The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has
> invalid child element 'version' in namespace 'urn:nhibernate-
> mapping-2.2'.

And my mapping is :
<class name="PartieEnCause" table="SIPCAUSCVA_TB" optimistic-lock="version">
<!--Clé-->
<composite-id name="ID_PartieEnCause" class="ID_PartieEnCause">
<key-property name="CENSEIGCVA"/>
<key-property name="NSINCVA"/>
<key-property name="NPCAUSCVA"/>
</composite-id>

<!--Propriétés-->
<property name="CQUALPARTCVA"/>
<property name="CDEPARTCVA" />
<property name="CPAYSCVA" />
<property name="CETAVICORCVA" />
<property name="CSTAPVIECVA" />
<property name="CSTAMAISCVA" />
<property name="CDEPARTCVA_1" />
<property name="CSEXCVA" />
<property name="LPCAUDCVA"/>
<property name="LASSPECCVA" />
<property name="LCPCAUSCVA" />
<property name="LPRENVICCVA" />
<property name="DNEXCVA" />
<property name="NNAISVICCVA" />
<property name="NAGEVICCVA" />
<property name="CBARSECUCVA" />
<property name="QTXRPROTCVA" />
<property name="DDCPPHYSCVA" />
<property name="DPROJVIECVA" />
<property name="LSPROJVIECVA" />
<property name="LSMAISONCVA" />
<property name="CAGGSITPCVA" />
<property name="LAGGSITPCVA" />
<property name="CPCAUSASCVA" />

<!--Nomenclatures-->
<many-to-one name="QualitePartieEnCause" class="QualitePartieEnCause" insert="false" update="false">
<column name="CQUALPARTCVA"/>
</many-to-one>
<many-to-one name="DepartementPartieEnCause" class="Departement" insert="false" update="false">
<column name="CDEPARTCVA"/>
</many-to-one>
<many-to-one name="DepartementMD4" class="Departement" insert="false" update="false">
<column name="CDEPARTCVA_1"/>
</many-to-one>
<many-to-one name="EtatVictimeCorporelle" class="EtatVictimeCorporelle" insert="false" update="false">
<column name="CETAVICORCVA"/>
</many-to-one>
<many-to-one name="StatutProjetVie" class="StatutProjetVie" insert="false" update="false">
<column name="CSTAPVIECVA"/>
</many-to-one>
<many-to-one name="StatutMD4" class="StatutMD4" insert="false" update="false">
<column name="CSTAMAISCVA"/>
</many-to-one>
<many-to-one name="SexePartieEnCause" class="SexePartieEnCause" insert="false" update="false">
<column name="CSEXCVA"/>
</many-to-one>

<!--Lien parent-->
<many-to-one name="DossierSinistre" class="DossierSinistre" insert="false" update="false">
<column name="CENSEIGCVA"/>
<column name="NSINCVA" />
</many-to-one>

<!--Liens fils-->
<set name="ProceduresJudiciaires" inverse="true" fetch="join" cascade="delete-orphan">
<key>
<column name="CENSEIGCVA"/>
<column name="NSINCVA"/>
<column name="NPCAUSCVA"/>
</key>
<one-to-many class="ProcedureJudiciaire"/>
</set>

<set name="Intervenants" inverse="true" fetch="join" cascade="delete-orphan">
<key>
<column name="CENSEIGCVA"/>
<column name="NSINCVA"/>
<column name="NPCAUSCVA"/>
</key>
<one-to-many class="Intervenant"/>
</set>

<!--Colonne version-->
<version name="NVERTECHCVA" />
</class>

Thanks for your help and suggestions.

Sincerely yours,


Top
 Profile  
 
 Post subject: Re: Mapping error
PostPosted: Wed Jul 01, 2009 1:52 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
You've got the wrong order. version has to be put before property and associations. YOu can put nhibernate-mapping.xds from the source distribution to C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas and get IntelliSense in VS.

_________________
--Wolfgang


Top
 Profile  
 
 Post subject: Re: Mapping error
PostPosted: Wed Jul 01, 2009 3:40 am 
Newbie

Joined: Tue Jun 30, 2009 11:03 am
Posts: 2
It works ! Thank you very much.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.