Does anyone know of a way to select child records using one set of keys, but have them mapped to their parent using another set of keys.
For example, I have a set of parent records which I need to have children mapped to. I want the children to be mapped using KeyColumn1 and KeyColumn2, however I cannot select them from the database using KeyColumn1 and KeyColumn2. I know its a bad DB design but I am stuck with it. I have to select them from the database using KeyColumn3 and KeyColumn4.
I have thought of using a select to get all the parents, then using a select to get all the children (without using a bag or any other collection), but I dont think there is a way to hand the parent set, all the children and have the children associated to its respective parents.
Thanks and sorry for being such a newbie.
|