-->
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.  [ 4 posts ] 
Author Message
 Post subject: Properties Element in one-to-many mapping throwing exception
PostPosted: Mon Jan 18, 2010 12:53 pm 
Newbie

Joined: Mon Jan 18, 2010 12:37 pm
Posts: 1
I am currently using version 2.1.2.4 of NHibernate.
I am attempting to fetch a child collection of pages for a chapter on a non-PK column by using the <properties> element mapping configuration.
I obtain a property not found exception for property "chapterToPages", which is really just grouping the 2 properties on the class to create the the property-ref relation.

Is there something missing in the way this is mapped or is this feature not supported?
(The nhibernate-mapping-2.2 xsd file does currently have support for this property)

Details for Mapping file for Chapter are:

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" >
<class name="Chapter" table="Pages" >
<id name="Id" column="Id" type="Int32" unsaved-value="0">
<generator class="native"></generator>
</id>
<property name="foo1" column="foo1" type="string" length="255" not-null="true"/>
<property name="Number" column="ChapterNumber" type="Int32" not-null="true"/>
<properties name="chapterToPages" >
<property name="Manual" />
<property name="Number" />
</properties>
<bag name="Pages" table="Pages" generic="true" inverse="false" cascade="all" >
<key property-ref="chapterToPages" />
<one-to-many class="Page"/>
</bag>
<many-to-one name="Manual" class="Models" column="ManualId"/>
</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject: Re: Properties Element in one-to-many mapping throwing exception
PostPosted: Mon Mar 08, 2010 2:22 pm 
Newbie

Joined: Sat Jul 30, 2005 9:22 pm
Posts: 3
Location: Pennsylvania, USA
I am encountering the exact same issue. Oddly enough, I don't see anything about the <properties> element in the NHibernate documentation, but as you stated the XSD does allow for the element.


Top
 Profile  
 
 Post subject: Re: Properties Element in one-to-many mapping throwing exception
PostPosted: Mon Mar 08, 2010 2:22 pm 
Newbie

Joined: Sat Jul 30, 2005 9:22 pm
Posts: 3
Location: Pennsylvania, USA
I am encountering the exact same issue. Oddly enough, I don't see anything about the <properties> element in the NHibernate documentation, but as you stated the XSD does allow for the element.


Top
 Profile  
 
 Post subject: Re: Properties Element in one-to-many mapping throwing exception
PostPosted: Mon Dec 06, 2010 9:44 am 
Regular
Regular

Joined: Fri Feb 18, 2005 3:34 am
Posts: 88
Location: Poland/Wrocław
It is a pitty as I also would like to have it working...

http://216.121.112.228/browse/NH-2410

_________________
Please rate this post if you've found it helpfull
Roland


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