使用Fluent-Nhibernate映射
我尝试映射此表:使用Fluent-Nhibernate映射,fluent-nhibernate,Fluent Nhibernate,我尝试映射此表: CREATE TABLE AHQ.ReportConfigurationAttribute ( IdReportConfiguration integer NOT NULL, IdAttribute integer NOT NULL, [Order] integer NOT NULL, [Type] integer NOT NULL, CONSTRAINT PK_ReportConfiguration_Attribute PRIM
CREATE TABLE AHQ.ReportConfigurationAttribute (
IdReportConfiguration integer NOT NULL,
IdAttribute integer NOT NULL,
[Order] integer NOT NULL,
[Type] integer NOT NULL,
CONSTRAINT PK_ReportConfiguration_Attribute PRIMARY KEY (IdReportConfiguration, IdAttribute)
);
以及
有什么建议吗
谢谢您正在使用fluent配置吗?如果是这样,请也张贴代码
检查映射类是否为公共类。您好,克里克,您说得对,我忘了将我的类设置为公共类。
Schema("AHQ");
CompositeId()
.KeyProperty(x => x.IdReportConfiguration)
.KeyProperty(x => x.IdAttribute);
Map(a => a.Order);
Map(a => a.Type).CustomType<ReportConfigurationAttribute.ReportConfigurationAttributeType>();
NHibernate.MappingException : No persister