Populate an unmapped property of domain object from result of join with Nhibernate
- by Adam Pope
I have a situation where I have 3 tables: StockItem, Office and StockItemPrice. The price for each StockItem can be different for each Office.
StockItem(
ID
Name
)
Office(
ID
Name
)
StockItemPrice(
ID
StockItemID
OfficeID
Price
)
I've set up a schema with 2 many-to-one relations to link StockItem and Office. So in my…