I have been struggling with getting lookup fields - in combination with lookup comboboxes - to work properly. On initial loading in a grid, all values were blank until (re-)selected. By chance, I stumbled on the ClientLookup demo and the use of TObjectMap (I had missed this in the What’s New
). Applying the TObjectMap, everything works as required now but there’s one thig I’m wondering about.
Assumption: The TXDataClient simply loads entities in TLists' returned (i.e. for data and lookup tables). As such there may be duplicates across the various TLists I have in use for data and lookup.
Question: Let’s assume we have TInvoice and TCustomer. With the TObjectMap in use, I link the lookup reference (TInvoice.Customer) to a lookup TCustomer from the TObjectManager it was added to. In my case, I had TInvoice.Customer defined as Eager. Does this mean, I now have it loaded multiple times and would it not be better/more efficient (faster, less memory) to define it as Lazy to avoid loading it with the TInvoice and with the TCustomer lookup? Thinking even further, with multiple instances of TCustomer loaded across TLists, could it potentially lead to Concurrency (Version) issues?