-->
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: package attribute in NHibernate mapping files
PostPosted: Sun Jun 18, 2006 9:05 am 
Newbie

Joined: Sat Jun 17, 2006 9:44 am
Posts: 6
Isn't the package attribute supported in NHibernate .hbm.xml files? Whenever I try to use the package attribute on the hibernate-mapping element I get:

Quote:
Unhandled Exception: NHibernate.MappingException: The 'package' attribute is not declared. ---> System.Xml.Schema.XmlSchemaException: The 'package' attribute is not declared.
at NHibernate.Cfg.Configuration.ValidationHandler(Object o, validationEventArgs args) in :\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1562
at System.Xml.Schema.BaseValidator.SendValidationEvent XmlSchemaException e, XmlSeverityType severity)


I'm using the latest version (1.2.0.Alpha1).


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 18, 2006 11:56 am 
Expert
Expert

Joined: Fri May 13, 2005 5:56 pm
Posts: 308
Location: Santa Barbara, California, USA
I'm assuming you mean "package" as in Java package. in .NET it is called an "assembly." a mapping file would help here.

Code:
<hibernate-mapping
   xmlns="urn:nhibernate-mapping-2.0"
   namespace="My.Assembly.Package"
   assembly="My.Assembly">


-devon


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 18, 2006 12:45 pm 
Newbie

Joined: Sat Jun 17, 2006 9:44 am
Posts: 6
devonl wrote:
I'm assuming you mean "package" as in Java package. in .NET it is called an "assembly." a mapping file would help here.

Code:
<hibernate-mapping
   xmlns="urn:nhibernate-mapping-2.0"
   namespace="My.Assembly.Package"
   assembly="My.Assembly">


-devon


Hi Devon,

Thanks for the pointer! I had already fixed it using the description in the NHibernate documentation. I was using "the wrong doctype", so it suggested that I use the package attribute (now I'm using the supplied xsd for auto-completion).


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.