Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
>>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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement