开发者

Mapping using Fluent Nhibernate

I try mapp this table:

    CREATE TABLE AHQ.ReportConfigurationAttribute (
    IdRepor开发者_如何学PythontConfiguration integer NOT NULL,
    IdAttribute integer NOT NULL,
    [Order] integer NOT NULL,
    [Type] integer NOT NULL,
    CONSTRAINT PK_ReportConfiguration_Attribute PRIMARY KEY (IdReportConfiguration, IdAttribute)
);

and,

 Schema("AHQ");
        CompositeId()
            .KeyProperty(x => x.IdReportConfiguration)
            .KeyProperty(x => x.IdAttribute);
        Map(a => a.Order);
        Map(a => a.Type).CustomType<ReportConfigurationAttribute.ReportConfigurationAttributeType>();

But

NHibernate.MappingException : No persister

any suggestions?

Thanks


Are you using fluent configuration? If so please also post the code for this.

Check that your mapping classes are public.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜