-->
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: Fluent Conf Exception: Association references unmapped class
PostPosted: Tue Aug 17, 2010 11:17 am 
Newbie

Joined: Tue Aug 17, 2010 10:53 am
Posts: 1
Dear visitor - I'm new to NHibernate and came across the following problem:

I've one base class for all my entities. In my entities I use list of this base class for references. For example:

class A : BaseClass
{
IList<BaseClass> myList;
}

class B : BaseClass
{
}

class C : BaseClass
{
}

At runtime it's decided which conrete class - B or C - is filled in myList.

To use NHibernate I wrote a map class for each entity A,B,C - but not for the base class (Is there a way to do that - I've some redundant code for the attributes of the base class??)

class AMap : ClassMap<A>
{
......
HasMany(x => x.myList).Inverse().Cascade.All().KeyColumn("xyz");
.....
}

I end up with the error "Association references unmapped class: BaseClass" which is truly right - I don't have a map class for my BaseClass.

I tried it with SubClassMap but that did not solve the problem.
How can I solve the problem?? Any help is urgently needed ...


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.