如何通过等效代码将流畅的 nHibernate 动态属性映射转换为 NH 3.2 映射
我在流畅的 nHibernate 中有以下映射:
public CustomFieldsMap()
{
Schema("schema");
Table("table");
Id(x => x.Id, m => m.Column("id"));
DynamicComponent(x => x.Fields, c =>
{
...insert code here...
});
}
这工作正常(显然是真实的代码)。
我无法弄清楚 nHibernate 3.2 中引入的通过代码映射功能中的等效项是什么(如果有的话)?
I have the following mapping in fluent nHibernate:
public CustomFieldsMap()
{
Schema("schema");
Table("table");
Id(x => x.Id, m => m.Column("id"));
DynamicComponent(x => x.Fields, c =>
{
...insert code here...
});
}
This works fine (with the real code in obviously).
What I cannot work out is what the equivalent is (if there is one yet) in the mapping by code feature introduced in nHibernate 3.2?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须提供动态组件模板。
有关示例和说明,请参阅本文。
You have to provide dynamic component template.
See this article for examples and explainations.
不能使用RegisterDynamicComponentMapping吗?
Can you not use RegisterDynamicComponentMapping?