Folks,
I am struggling with mapping specific data structure. We have tables like
this:
- UniqueId /identity/
- EntityId /business Id/
- some data columns
(..)
- finiacialPeriodId
- recordStatus
- validFrom
- validTo
The last 4 columns are in all tables, they are a kind of entity version.
Now domain objects are related between each other through business id:
EntityId. This Id of course is not unique within a table. to find the real
related object one need to take proper (finiacialPeriodId, recordStatus,
validFrom, validTo). Domain object look like this:
class EnityAAA
{
int EnityAAAId
int EnityAAAUid
IEnumerable <EntityBBB> RelatedCollection
int finiacialPeriodId
int recordStatus
DateTime validFrom
DateTime validTo
}
class EntityBBB
{
int EntityBBBId
int EntityBBBUid
EntityAAA ParentRelatedObject
int finiacialPeriodId
int recordStatus
DateTime validFrom
DateTime validTo
}
The question is whether it is possible at all to map this with NH? I was
playing with Property Formula mapping - works, but don't know how to deal
with collections. Maybe there are patters to deal with such structures of
data I don't know..?
Regards
Mariusz
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.