从 subclassMap 引用组件
我试图从子类映射中引用组件,但出现以下异常
“访问者尝试解析未解析的组件引用“Weight”,从“RecipeFermentable”的属性“Weight”引用,无法继续。”
public class RecipeFermentableMap : SubclassMap<RecipeFermentable>
{
public RecipeFermentableMap()
{
Map(x => x.Pppg);
Component(x => x.Weight);
References(x => x.Recipe);
}
}
当我使用普通的 ClassMap 执行此操作但在重构为 SubclassMap 后停止工作时,此操作有效。
I am trying to reference a component from a subclass map but am getting the following exception
"Visitor attempted on unresolved componented reference 'Weight', referenced from property 'Weight' of 'RecipeFermentable', unable to continue."
public class RecipeFermentableMap : SubclassMap<RecipeFermentable>
{
public RecipeFermentableMap()
{
Map(x => x.Pppg);
Component(x => x.Weight);
References(x => x.Recipe);
}
}
This work when I do it with a normal ClassMap but stopped working after re-factoring into a SubclassMap.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论