Hi,
Quite new to NHibernate so please pardon if this is obvious, but I have
been searching for a view to find the answer.
I am using NHibernate to map onto a legacy database to expose its data via
WCF Data Services.
We have a table that holds prices a tariff code, which can be historic data
and also future data,
but when I retrieve the products I need the current data, so that would the
maximum EffectiveDate but also less than todays date.
I do actually need more than just the price, I am currently mapping the
whole TariffTable, but for brevity I have truncated the tables.
Could someone please give me some pointers? I am using the ByCode mapping
but am happy to change if required.
Thanks,
TariffTable
TariffCode
EffectiveDate
Price
ProductTable
ProductCode
ProductDescription
TariffCode
Sample Data:
1000 01-Jan-2012 1.23 <--- Historic
1000 01-Jul-2012 1.50 <--- The price today
1000 01-Jan-2013 1.75 <--- The price next year
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/V2TfvHf6xz8J.
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.