开发者

Mapping using Fluent Nhibernate

开发者 https://www.devze.com 2023-03-26 23:53 出处:网络
I try mapp this table: CREATE TABLE AHQ.ReportConfigurationAttribute ( IdRepor开发者_如何学PythontConfiguration integer NOT NULL,

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

精彩评论

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