Clearly. However, Parent (Child.Parent := Parent) is an Entity. The question was whether there is a way in which I can simply set the GUID value (i.e. the value of the underlying Foreign Key field):
Child...???... := ParentID_GUID
The idea is that for each "record" in the file, I wish to create a new entity, set the GUID value (and all other properties) and Save/Merge/Replicate it to the database. This way I do not have to get the associated entity and thereby reduce the number of SQL's to execute.
Having said that; on further thought I realized that the parent record was in the same import file so if I am not mistaken, I can simply execute:
Child.Parent := ObjMgr.Find<TParent>(ParentID)
There will be no additional SQL involved as the TParent is already in the Object Manager….
Nevertheless, I am still curious if there's a possibility to set the GUID value (for Child.Parent) directly. I think that in some situations it may be useful.
Thanks and regards,
Mark