Edgewall Software

Changes between Version 2 and Version 3 of TracDev/Proposals/Journaling


Ignore:
Timestamp:
Nov 24, 2006, 3:01:31 PM (17 years ago)
Author:
Christian Boos
Comment:

s/Transaction/ModelTransaction/

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/Proposals/Journaling

    v2 v3  
    127127            ...
    128128            # Getting a new transaction for creating a Wiki page
    129             tnx = Transaction(self.env.get_db_cnx())
    130             tnx.prepare(req, 'CREATE')
     129            tnx = ModelTransaction(self.env.get_db_cnx())
     130            tnx.prepare(req.authname, 'CREATE')
    131131            tnx.save('wiki', id=pagename, readonly=readonly, content=content)
    132132            tnx.commit()     # flush all changes to disk
     
    135135    class TicketModule():
    136136        def _do_save(self, ticket):
    137             tnx = Transaction(self.env.get_db_cnx())
     137            tnx = ModelTransaction(self.env.get_db_cnx())
    138138            tnx.prepare(req, 'MODIFY')
    139139            tnx.save('ticket', ticket)
     
    141141            self.notify(tnx) # dispatch change information to listeners
    142142}}}
    143 The actual `Transaction` object would know how to modify the underlying (generic) data model.
     143The actual `ModelTransaction` object would know how to modify the underlying (generic) data model, hence the "Model" in the name.
    144144
    145145