0

I have one class A, reference two other classes, and the map like the following

public class AMap : ClassMap<A>
{
    public AMap()
    {
        Id(p => p.ID);
        References(p => p.B).Cascade.All();
        References(p => p.C).Cascade.All();
    }
}

public class BMap : ClassMap<B>
{
    public BMap()
    {
        Id(p => p.ID);
        Map(p => p.Name);
    }
}

public class CMap : ClassMap<C>
{
    public CMap()
    {
        Id(p => p.ID);
        Map(p => p.Name);
    }
}

Then I perform add operation of A into DB (MySql), why it always prompt one of the table id is unkonw column?

Background: This is tested in asp.net mvc application (CurrentSessionContextClass is set as 'web'), the same code works well in non-web application (CurrentSessionContextClass is set as 'call')

4

1 回答 1

0

糟糕,我遇到了一个愚蠢的问题,我连接到错误的数据库。

于 2013-07-14T10:22:17.990 回答