NHibernate Designer - many for many

Following the previous question, I evaluate the MindScape NHibernate Designer.

When I add a lot to many mappings, he says that he will not distribute it in the database.

Is there a way to match many for many with this tool (code generator). If I manually edited the xml mappings, I will lose it when changing the model.

Produced display:

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

I don’t want to create an item_item object and do it one by one in this link table, as this should be done by the designer (adding an object pollutes business objects and is not true).

Their reference docs say this can happen if you set the name of the source column and the name of the destination column ... Doesn't work!

enter image description here

+3
source share
1 answer

I am one of the developers of NHibernate.

Earlier versions of the constructor did not support the creation of a database schema for many-to-many associations. This restriction has been removed in the latest version. You can get the latest version through the tab "VS2010 Extension Manager Updates".

+4
source

All Articles