使用 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 PRIMARY KEY (IdReportConfiguration, IdAttribute)
);
并且,
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
有什么建议吗?
谢谢
I try mapp this table:
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)
);
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用流畅的配置吗?如果是这样,也请发布此代码。
检查您的映射类是否是公共的。
Are you using fluent configuration? If so please also post the code for this.
Check that your mapping classes are public.