Thread View: borland.public.delphi.language.delphi.general
1 messages
1 total messages
Started by Vinu
Mon, 30 Nov 2009 05:11
How to get the latest values for an object Instance?
Author: Vinu
Date: Mon, 30 Nov 2009 05:11
Date: Mon, 30 Nov 2009 05:11
28 lines
2567 bytes
2567 bytes
Hi all,
I have an application that has two modules. Each of these modules
has aa ACCOUNTS object which keeps a list of accounts of a customer.
his is a list of ACCOUNT objects. Each ACCOUNTS is defined for a
particular period. Each CUSTOMER object has a composition(deep copy)
with ACCOUNTS object. All these values are strored in a database. The
following is an outline of the object structure.
TCUSTOMER-->TPERIOD1,TPERIOD2
Now,
TPERIOD1--> TACCOUNTS1-->ACCOUNT1,ACCOUNT2....
TPERIOD2--> TACCOUNTS-2->ACCOUNT1,ACCOUNT2....
Now, I have a refresh functionality in module2 that refresh the
TACCOUNT object to the latest period. For example, in the above
example, the customer might be pointing to period1; and after refresh
it must point to the latest period, period2. If the customer is on
period2, then it must update to the latest values of period2, which
are set in Module1.
Thank you all in advance,
-Vinu
Now the problem comes. If the user of Module1 edits the values of
TACCOUNTS,TACCOUNT etc, in Module1, these are not reflected in Module2
since it stores a deep copy. I thought of to reload each object from
the DB and it seems very expensive. Can any one please let me know
about any alternate solution?If that is not possible, please tell me
how can I reload only the classes that changed in Module 1.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads