Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to detect if data has been changed?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01109147
Message ID:
01109258
Vues:
36
>>>If each biz obj has its own dataObj, then it wouldn't be a problem, unless one biz obj is populated from multiple data records, which is not our case.
>>>
>>
>>No, I mean one record from a table in a time. How can you handle multiple records change using your approach?
>>
>>In our case the biz objects usually handle changes from one table, but they can handle multiple records changes by using GetNextModified approach...
>>
>
>If each bizObj is populated from one data record, then n records would populate n biz objects. Since each bizobj has its own dataObj (storing initial values for that particular bizobj), then each bizObj would call its hasChanged() method to detect changes to its own properties. Then, based on the bizObj.hasChanged() return value and other biz logic, it can make a decision to proceed further; either discard changes, or promote changes to data. Of course, each bizobj has a property storing its data record ID, which ID is provided to the data layer upon saving the changes.
>In short, each biz obj should be able to provide accurate identification of the data record from which it has been populated, and which should be updated eventually.

I see the difference: in our system Data Object represents the whole table (cursor filled with data), in yours - one record.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform