When you save datarecords, in the notesdocument a "uid" field is generated that contains a calculated id that looks like this "1ece48e6-89da-487e-86e0-98373d325183".
When you add a table to a form, creating datarecords in the table generates linked documents.
There is a field "parentID" on the sub-datarecord, however this doesn't contain the calculated id that is in the other record, but an internal notesdocumentuniqueid that is saved on the parent document automatically and looks like this "34320F03DC10BE59C1258E76003750CE".
In case you have to restore a parent document from a backup it does maintain the "uid" however in many cases the internam notesdocumentuniqueid is recalculated. So from that point on the table-datarecords are still there in the database but not linked to the parent any longer, because they are using the notesdocumentuniqueid instead of the uid.
What we would need:
- also store the "uid" of the parent as "parentuid" on the table-datarecords
- actually use "parentuid" as the real key
I know this is not easy to do, maybe it has to be discussed, because there would have to be a some kind of data migration, because you can't just change keys around. However in the longer run this would still be better solution. Or lookup both ids.
The UNIDs of notes documents change when puting into different copies of a DB including backups