开发者

NHibernate Designer - many to many

Following on from a previous question, I am evaluating MindScape's NHibernate Designer.

When I add a many to many mapping, it says that it won't propagate this to th开发者_开发百科e database..

Is there a way to map the many to many using this tool (a code generator). If I manually edit the mappings xml I lose it on changing the model.

The produced map:

<bag name='Roles' table='`RoleUser`'>
  <key column='`UserId`' />
  <many-to-many column='`RoleId`' class='Role' />
</bag>

I don't want to create an entity item_item and do a one to many on that link table as this should be done by the designer (adding an entity pollutes the business objects and is wrong).

Their help documents say that this can happen if you set the source column name, and destination column name... Not working!

NHibernate Designer - many to many


I am one of the developers of the NHibernate designer.

Earlier versions of the designer didn't support generating the database schema for many-to-many associations. This limitation has been removed in the latest version. You can get the latest version through the VS2010 Extension Manager Updates tab.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜