Project

General

Profile

Feature #778

VersionedRecord could work on table-level

Added by Jan Klopper over 7 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Model
Target version:
Start date:
2012-04-17
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

For the situations where only a single value needs version tracking, and not a whole set of them, the _RECORD_KEY could be explicitly set to None. The Model would then exhibit the following behaviour:

  • When loading, it would return the record with the highest primary key value
  • When saving a change, it would insert a new record, using the autoincrement primary key field

Related issues

Related to µWeb - Feature #840: Model documentation updatesNew2012-05-31

History

#1 Updated by Elmer de Looff about 7 years ago

  • Subject changed from versioned record without _RECORD_KEY could act asif the whole table is one record with multiple versions to VersionedRecord could work on table-level
  • Description updated (diff)
  • Target version set to µWeb beta release

#2 Updated by Elmer de Looff almost 7 years ago

  • Status changed from New to Rejected
  • Assignee changed from Elmer de Looff to Jan Klopper

This is not really feasible, and has a number of problems:

The suggestion is basically for a singleton value on a table level. All the record instances are designed to represent a table row. Various default methods (List, FromIdentifier and possible others) will have various degrees of undefined behavior. In short, the idea is irreconcilable with the design decisions behind VersionedRecord.

It is however quite feasible to create a new class with behavior like this, where retrieving the record will give the latest version unless a specific version is requested, automatic version number increments are made, etc.

Also available in: Atom PDF