Hi, I need help mapping following situation: I have Account and AccountStatus tables where AccountStatus is a history of AccountStatuses so that for Account there is a status code, effective and expiration date. Basically Account can changes statuses and each change is tracked in AcountStatus table. Mind you this is a legacy db and there is no way of changing the data model. So now I need to have a current account status, which would be found by quering AccountStatus for AccountID with todays date between effective and expiration date. How would I map this?
Account PK AccountId AccountStatus PK AccountId PK EffectiveDate I create as AccountStatusCompositeId class so that I can map PK of AccountStatus using component mapping as described here http://nhforge.org/doc/nh/en/index.html#components-compositeid Now on the Account I want to have a relationship CurrentAccountStatus. How would I map this. I need to apply filter to select AccountStatus based on the date, yet from what I understand filters apply only to collections. I guess I could map backing filed as IList and then in property do .First ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
