Hibernate inner connection mapping - string where id
I would like to map the following sql to NHibernate. I need to make a separate object ie RoomTypeVO mapped to tb_tags in order to do this? Any help is greatly appreciated.
SELECT dbo.tb_rooms.id, dbo.tb_rooms.name, dbo.tb_tags.name AS 'roomType' FROM dbo.tb_rooms INNER JOIN dbo.tb_tags ON (dbo.tb_rooms.typeID = dbo.tb_tags.id)
<id name="id" column="id">
<generator class="native" />
</id>
<property name="name" />
+1
source to share