Project

General

Profile

Feature #556

Add a versioned record subclass

Added by Elmer de Looff about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Elmer de Looff
Category:
Model
Target version:
-
Start date:
2011-12-15
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

For the Underdark customer and invoicing system, it's necessary to have a version-tracked table with customer information. This problem is easiest solved in the uWeb model itself.

Associated revisions

Revision 140:ec7bd82d1991 (diff)
Added by Elmer de Looff about 13 years ago

Added the VersionedRecord class, which supports versioning a database table. This resolves #556.

History

#1 Updated by Elmer de Looff about 13 years ago

Groundwork for the subclass has been committed, this involves creating more delegation between methods and stricter-purpose methods.

#2 Updated by Elmer de Looff about 13 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Elmer de Looff to Jan Klopper
  • % Done changed from 30 to 70

This has been added in r3220 for Underdark. The new VersionedRecord class

It defines the following concepts, additions and changes:
  • cls._RECORD_KEY - The table field that has groups versioned records together
  • record_key - property that returns the value of the _RECORD_KEY field.
  • All Save() actions will create a new database entry
    • Records that have a record_key defined will use that
    • Records without a record_key will have one assigned from the _NextRecordKey method.
It (re)defines the following public methods:
  • FromIdentifier - Gets the last version of a Record based on the record key
  • List - Yields the latest version of all versioned database entries
  • ListVersions - Yields all versions for the given record key

Jan, if you could verify the functioning of this in the customer and invoicing portal you're working on, that'd be great.

#3 Updated by Jan Klopper about 13 years ago

  • Status changed from Resolved to Closed
  • Assignee changed from Jan Klopper to Elmer de Looff
  • % Done changed from 70 to 100

Seems to work as intended in 'customer'

Also available in: Atom PDF