-->
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: What about "versio" in NHibernate 1.2 Cr1
PostPosted: Wed Mar 28, 2007 4:18 am 
Newbie

Joined: Sun Mar 18, 2007 12:15 pm
Posts: 19
I am unable to use <version> in my mapping file. Am I doing wrong is version not longer supported in NHibernate 1.2 CR1 ??

My mapping file:

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
   <class name="lgTronic.Spada.Business.Entities.ClassComment,lgTronic.Spada.Business.Entities" table="Comments">
      <id name="Id" column="id" type="int" unsaved-value="0" >
         <generator  class="identity"></generator>
      </id>
      <property name="CommentStyle" length="50" not-null="true"></property>
      <property name="Comment"></property>
      <property name="CreatedDate" not-null="true"></property>
      <property name="ModifiedDate" not-null="true"></property>
      <property name="CreatedBy" length="50" not-null="true"></property>
      <property name="ModifiedBy" length="50" not-null="true"></property>
      <version name ="verson"></version>
   </class>
</hibernate-mapping>


My exeption:
Code:
.........................
The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'version' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expecte.............


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 4:30 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Its usage is exactly the same as before. The elements inside <class> have to follow a certain order, first <id>, then <version>, then the rest.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 4:53 am 
Newbie

Joined: Sun Mar 18, 2007 12:15 pm
Posts: 19
ok.... seems to work now.

Many thanx...
//lasse


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.