How can I map following queries using Fluent NHibernate (entity, mapping class etc..), the employee ids are stored in identifier tables. Person table contains employee information and non-employee information.
SELECT p.Id, p.FirstName, p.LastName
FROM Person p
UNION ALL
SELECT e.Id, e.FirstName, e.LastName
FROM Employee e
INNER JOIN identifier i on (e.Id = i.value)
INNER JOIN type t on (i.typeid = t.id and i.typeName = 'EmployeeId')
Anyone?