I do the same thing at SQL level too - and you need to do this at the SQL level -- if you're doing it at the roseDB level, the versions will reset to 0 whenever your app starts

in any event, i do this:

table myclass
        id intger NOT NULL primary key
        name NOT NULL
        ---
        date modified NOT NULL default CURRENT_TIMESTAMP
        revision number NOT NULL default 1

table myclass_archive
        archive_id integer NOT NULL primary key
        id integer NOT NULL
        name varchar NULL
        ...
        date modified NOT NULL CURRENT_TIMESTAMP
        revision number NOT NULL
        unique ( id , revision )

all updates to the following:
a- calculate vector change from new object to record in myclass table by doing a select then calculating the dict changes b- update myclass table and , increment modifaction date + revision number
        c- insert into myclass table the vector changes

with this method, i know who changed what, when






| - - - - - - - - - - - - - - - - - - - -
| RoadSound.com / Indie-Rock.net
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - -






-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to