-->
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.  [ 7 posts ] 
Author Message
 Post subject: Client with Address mapped using <Component> problem.
PostPosted: Thu Apr 20, 2006 9:31 am 
Regular
Regular

Joined: Fri Feb 03, 2006 5:28 pm
Posts: 73
Location: Québec, QC, Canada
Hi,

I have a Client class and an Address class.

I have Client.hbm.xml which has a
<component name="BillingAddress" class="Address">
<property .. />
</component>

but when NH creates its factory (thus read the hbm.xml files) it throws an exception

Could not load type 'Address' from assembly 'NHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc'.


Do I still need an Address.hbm.xml ? I removed Address.hbm.xml from my project..

I just don't get it !


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 9:39 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You need to fully qualify the class name, i.e. include the assembly name.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 9:59 am 
Regular
Regular

Joined: Fri Feb 03, 2006 5:28 pm
Posts: 73
Location: Québec, QC, Canada
I actually did that

class="Com.Progmatik.ClickMax.Address, Com.Progmatik.ClickMax.DomainModel">


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 10:06 am 
Regular
Regular

Joined: Fri Feb 03, 2006 5:28 pm
Posts: 73
Location: Québec, QC, Canada
nevermind!

I had a typing mistake!

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 10:07 am 
Beginner
Beginner

Joined: Tue Mar 28, 2006 3:44 am
Posts: 22
Hi martbl,

if your assembly name is "Com.Progmatik.ClickMax.DomainModel" (is it as seen here?), your code need a small change:
Code:
class="Com.Progmatik.ClickMax.DomainModel.Address, Com.Progmatik.ClickMax.DomainModel">


Greetings,
Chavez


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 10:09 am 
Beginner
Beginner

Joined: Tue Mar 28, 2006 3:44 am
Posts: 22
Well, just a minute too late. ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 10:14 am 
Regular
Regular

Joined: Fri Feb 03, 2006 5:28 pm
Posts: 73
Location: Québec, QC, Canada
Well.. the assembly is Com.Progmatik.ClickMax.Domain model

but the namespace is Com.Progmatik.ClickMax...


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