Parent child relation

Recently, I have archived a collection of documents to archive database. After I am done, I lost parent child relationship ($ref is not matching with parent UNID). I do not have a backup. Is there a way to re-establish parent child relation.

One more thing, my child documents do not hold values of parent’s. I use @GetDocField($Ref,). I thought, if I have the value then, I can manually check and run an agent.

Any help is greatly appreciated.

Thanks,

Anil -

Subject: parent child relation

Sorry to say, but if you do not have values from the parent on the child, then I do not think there is a way to recreate that relationship

Also, if I may, using @GetDocField($Ref,). is not wise. I have seem many applications that used this and what a nightmare they were

a trick that I picked up from SQL server, is that you have a primary key created on the parent doc and carry that key to each child

You should also store some values on the child from the parent so that you have a way to reconnect the children to their parents

Subject: RE: parent child relation

Thanks for the help Michael.

I totally agree with you, I would never design an application with @GetDocField (being used as primary relationship joiner). I man use it to just get the values when parent document values changes to keep them in sync. But, unfortunately, I am maintaining other’s code.

I am going to write my own algorithm to maintain the relationship and (as you said) I am going to store parent values in child.

Thanks once again.

Anil.