-->
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: error persists
PostPosted: Mon Sep 26, 2005 6:52 pm 
Newbie

Joined: Mon Sep 26, 2005 3:26 pm
Posts: 6
I delete attribute unsave-value but the mistake persists and I replace set by bag tag in region xml mapping file.

my new hbm.xml files are:
[code]
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="NHDomainModel.Region, NHDomainModel" table="REGIONS">
<id name="RegionId" column="REGION_ID" type="Int32" unsaved-value="0" >
<generator class="sequence">
<param name="sequence">REGION_SEQ</param>
</generator>
</id>
<property name="RegionName" column="REGION_NAME" type="String"/>
<bag name="Countries" cascade="all" lazy="false" inverse="true">
<key column="REGION_ID" />
<one-to-many class="NHDomainModel.Country, NHDomainModel" />
</bag>
</class>
</hibernate-mapping>

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="NHDomainModel.Country, NHDomainModel" table="COUNTRIES">
<id name="CountryId" column="COUNTRY_ID">
<generator class="assigned" />
</id>
<property name="CountryName" column="COUNTRY_NAME" />
<many-to-one name="Region" column="REGION_ID" class="NHDomainModel.Region, NHDomainModel" />
</class>
</hibernate-mapping>
[/code]


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.