开发者

Fluent NHibernate Many to Many Mapping

开发者 https://www.devze.com 2023-03-19 19:46 出处:网络
I have a scenario in which i go开发者_如何学Ct 2 tables, and a third bridge table for many to many relationship.

I have a scenario in which i go开发者_如何学Ct 2 tables, and a third bridge table for many to many relationship.

Table A:

  • AID
  • AName

Table B:

  • BID
  • BName

TableAB

  • AID
  • BID
  • Allow
I have extra field in bridge table how to map many to many in this scenario.

Thanks


I think you have to create an entity for the bridge table!

Look here:

additional fields in NHibernate many-to-many relation tables

update

I also found this workaround but I've not tested it:

Nhibernate many-to-many with extra fields in the join table

0

精彩评论

暂无评论...
验证码 换一张
取 消