I have a legacy database that contains three entities in one table - Category, Product, and Variant to be precise. There is a column called ClassType that defines which entity the row belongs to (1=Category, 2=Product, 3=Variant).
How do I translate that to a (Fluent) NHibernate mapping?
For example, I have a unit test Can_get_products_in_category. When I run the test and look at the SQL it returns the products but also the categories. Is there a way to say "only return ids with ClassType = x"?
I should say that I also have a Hierachry table that just contains the Id and child Ids for both Categories, child categories, and products.
I'm fairly new to (Fluent) NHibernate.