Hello everyone,

I've done some nHibernate in the past but nothing advanced and tricky.
Wanted to know if it is possible to utilize nHibernate for a legacy DB
I'm working with now. The DB schema is very bad, not normalized and
was not well maintained.

One of the cases I have is a single table that contains information
for a whole group of objects: an aggregate contains a list of sub-
aggreagates which, in turn, have lists of other objects:

AggreadateId   SubaggregateId    Object1Name   Object1Detail ....
ObjectNName  ObjectNDetail

1                      1                         Smth
Smth                 SmthElse        SmthElse
1                      2                         Smth
Smth                 SmthElse        SmthElse
1                      3                         Smth
Smth                 SmthElse        SmthElse
2                      1                         Smth
Smth                 SmthElse        SmthElse
2                      2                         Smth
Smth                 SmthElse        SmthElse

This example contains data for 2 aggregates, first one with 3 sub-
aggregates and second one with 2 sub-aggregates and each sub-aggregate
contains list of N objects.

So, I am wondering if it is at all possible to build some sort of
mapping that would direct nHibernate to go through this table picking
up Aggregate with Id of 2 and then creating a list of Sub-aggregates
related to the Aggregate and then the list of Objects in those sub-
aggregates.

Any help or direction would be highly appreciated.

Thanks


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to