Fluent NHibernate View Mapping requires Id Column
When trying to use FNH to display a view - FNH insists that the Id property be displayed. However, not all of my views have a unique identity column.
I can get around this with XML mappings as I can just specify
<id type="int">
<generator class="increment"/>
</id>
at the top of the display.
Is there a way to duplicate this in FNH ...?
+2
a source to share
3 answers
Pretty sure the view should be indexable, which I haven't done in a while, but I recall that it involves creating composite keys and providing a SchemaBound view. Then, in the FNH mapping, you must provide the table name (which you probably already have) and the UseCompositeId method.
0
a source to share