map a class that has another class nested inside using automapping

glant's Avatar

glant

20 Aug, 2010 10:25 PM via web

How to map a class that has another class nested inside it. I am using automapping. It gives exception 'NHibernate.MappingException: Association references unmapped class: class1+class2'

suppose you have
public class baseclass
{

}

public class class1 : baseclass
{

public class class2 : baseclass {

} }

  1. Support Staff 2 Posted by Paul Batum on 21 Aug, 2010 02:44 PM

    Paul Batum's Avatar

    I recently applied a patch to allow for this. This was the relevant commit:
    http://github.com/paulbatum/fluent-nhibernate/commit/ae546f6015adce67b1e12e7f23b996707c28fea9

    Essentially you override ShouldMap(Type type) in your automapping
    configuration to return true for the appropriate nested classes.

    On Sat, Aug 21, 2010 at 8:27 AM, glant <
    tender+d1518658ea015e35158c7bd5a4183daeaa347c495@tenderapp.com<tender%2Bd1518658ea015e35158c7bd5a4183daeaa347c495@tenderapp.com>
    > wrote:

  2. 3 Posted by glant on 21 Aug, 2010 07:57 PM

    glant's Avatar

    Thanks Paul for response.

    Do you know when the next official release for Fluent would be...any roadmaps

Reply to this discussion

Preview Comments are parsed with Markdown. Help with syntax

Attached Files

    You can attach files up to 10MB

    What comes next? 'Monday Tuesday Wednesday ?????'