NHibernate 3.2 中的映射 - 数组、自定义列表
目前正在查看 NHibernate 3.2,并且在代码映射方面遇到了一些困难。谁能给我提供一个映射字符串或整数数组的简单示例?我似乎找不到任何不用于通过 xml 映射的代码示例或文档。
其次,通过代码进行这种新映射,必须为自定义集合实现 IUserCollectionType 的限制仍然有效吗?
提前致谢。
Looking at NHibernate 3.2 at the moment and am struggling a little with the mapping by code. Can anyone provide me with a simple example of mapping an array of strings or ints? I can't seem to find any code examples or documentation anywhere that isn't for mapping by xml.
Secondly with this new mapping by code is the limitation of having to implement IUserCollectionType for custom collections still valid?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有任何代码,有点难以回答,但听起来很多人都需要一个组件:
FluentNhibernate HasMany with component
这是与 Fluent NH 一起使用的,如果可以的话最好的选择。
其次使用 Fluent NHibernate 进行映射,它都是代码而不是 XML。
Without any code it's a little difficult to answer but it sounds like many need a componnet:
FluentNhibernate HasMany with component
This is for use with Fluent NH, best bet if you can.
Secondly map using Fluent NHibernate, it's all code and not XML.