FluentNHibernate:自动映射 OneToMany 关系
通过流畅的 nhibernate,我无法使用带有约定的自动映射,因为它向表中添加了额外的外键以进行关系。该问题在 stackoverflow.com/questions/6091654/ Fluentnhibernate-automapping-onetomany-relation- using-attribute-and-convention/7867516
但正如你所看到的,通过使用属性来解决。我的问题是:
我不想在 Model Properties 上使用属性。因为接下来的几年我们可能不会在项目中使用nhibernate。所以我不想碰模特。没有KeyColumnAttribute的问题有没有解决方案。
谢谢
via fluent nhibernate, I cant use automapping with conventions because it adds extra foreign key to the table for relation. The problem was explained in detail at stackoverflow.com/questions/6091654/fluentnhibernate-automapping-onetomany-relation-using-attribute-and-convention/7867516
But as you can see, it is solved by using attribute. My question is:
I dont want to use attribute on Model Properties . Because we maybe wont use nhibernate in the project in following years. So I dont want to touch Models. Is there a solution for the problem without KeyColumnAttribute.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)