Hello,
I have a scenario where I fetch data from two different tables into a
"Reservable". You can reserve from inventory stock or from framework
contracts. This is mapped using Table per concrete class strategies.
However, I found a challenge. There is slighty different rules in what's
acceptable as a reservable. StockInventory it's sufficient with quantity > 0
but for framework contracts it need to be cofirmed as well.
I would like to do something like:
var listOfReservables = Session.CreateCriteria(typeof (Reservable))
.Add(Restrictions.Gt("Quantity", 0))
.Add(Restrictions.Eq("Status", "Confirmed"))
.List<Reservable>();
But this isn't possible in it's current form since StockInventory doesn't
have a Status, just the Framework Contract. Is this possible? Or do I need
to create two separate queries for each concrete class and joint them
myself?
--
Patrik Löwendhl
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.