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: XMLValidation error - <list> can't have <one-to-man
PostPosted: Fri Nov 30, 2007 1:57 pm 
Regular
Regular

Joined: Thu Nov 30, 2006 10:48 am
Posts: 59
This may be due to the fact that I have a custom-built version of nHibernate (1.2.0.GA merged with the NH-466 patch). I get an XML validation error on the mapping file saying that the one-to-many element is invalid (specifically, the error is: "The element 'list' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'one-to-many' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'urn:nhibernate-mapping-2.2:index'.").

Although nhibernate-mapping.xsd is probably embedded in the DLL/Assembly, the stand-alone nhibernate-mapping.xsd file that I was sent has the <list> element with the <one-to-many> element in it.


Hibernate version: 1.2.0.GA merged with the NH-466 patch

Mapping documents:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">
<class name="Domain.NetworkInterface.NetworkIntrface, Domain" table="dbo.tblNetworkInterface">
<discriminator column="TypeName" />
<subclass name="Domain.NetworkInterface.PhysicalNetworkInterface, Domain" discriminator-value="PhysicalNetworkInterface">
<property name="MACAddress" column="MACAddress"/>
<list name="SubInterfaces">
<key column="FK_ParentNetworkInterfaceID"/>
<one-to-many class="Domain.NetworkInterface.SubInterface, Domain"/>
</list>

<many-to-one name="ParentDevice" class="Domain.PhysicalDevice.PhysicalNetworkDevice, Domain" column="FK_DeviceID" outer-join="false" cascade="all"/>
</subclass>
<subclass name="Domain.NetworkInterface.VirtualNetworkInterface, Domain" discriminator-value="VirtualNetworkInterface">
<subclass name="Domain.NetworkInterface.SubInterface, Domain" discriminator-value="SubInterface">
<many-to-one name="ParentPhysicalNetworkInterface" class="Domain.NetworkInterface.PhysicalNetworkInterface, Domain" column="FK_ParentNetworkInterfaceID" outer-join="true" cascade="all"/>
</subclass>
<subclass name="Domain.NetworkInterface.VirtualNetworkInterfaceInDevice, Domain" discriminator-value="VirtualNetworkInterfaceInDevice">
<subclass name="Domain.NetworkInterface.Loopback,Domain" discriminator-value="Loopback">
</subclass>
<subclass name="Domain.NetworkInterface.Tunnel, Domain" discriminator-value="Tunnel">
</subclass>
<subclass name="Domain.NetworkInterface.VLAN, Domain" discriminator-value="VLAN">
</subclass>
</subclass>
</subclass>
</class>
</hibernate-mapping>

_________________
metazone


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.