在NHibernate的附加字段许多一对多的关系表 [英] additional fields in NHibernate many-to-many relation tables

查看:268
本文介绍了在NHibernate的附加字段许多一对多的关系表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我有NHibernate的一个多to.many关系,让NHibernate的生成我的数据库架构,它增加了一个aditional的表,其中包含相关实体的主键。 是有可能增加额外的字段此,访问它们,而无需费尽口舌周围用sql手动?

when i have a many-to.many relation with nhibernate and let nhibernate generate my db schema, it adds an aditional table that contains the primary keys of the related entities. is it possible to add additional fields to this and access them without having to hassle around with sql manually?

推荐答案

我不认为这就是可能的。如果你说的关系,有一些国家比它在本质上是在它自己的权利的对象,并应及时治疗(映射)本身。

I don't think thats possible. If you are saying that the relation has some state than in essence it is an object in it's own right and should be treated (mapped) as such.

这篇关于在NHibernate的附加字段许多一对多的关系表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆