I’ve literally searched high and low, and can’t seem to find a recent solution for this.
I’m trying to implement a un-mapped class which is a DTO from 2 tables and will be returned from a HQL statement.
I can’t find any examples of how to do this in Fluent Hibernate, only in standard NHibernate XML files which, doesn’t suit our needs.
Has anybody had any experience of using the <Import class="CLASS" /> in Fluent?
Thanks
I recently accomplished just what you are asking. I found the instructions at this URL:
http://avinashsing.sunkur.com/2010/08/18/mapping-an-unrelated-class-in-fluent-nhibernate/
The example in that link don’t happen to use two tables in a join, but it works just the same: just use the ImportType<> directive in one of the classes.