TODO
====

Features
--------

* timestamp on records for workflow transitions, creation date. Need 
  to complete tests, especially for relations and updating.

* compare relations when updates are in play.

* archiving doesn't seem to be taking place recursively. Need to do this
  at least for some cases of archiving.. Tests for archiving/removing.

* many to many relations. A relation is published if either half
  of the relation is published.

* disallowing editing of published and archived models.

* propose deletion/archiving status. This doesn't need a new version of
  the object: PUBLISHED_UNDER_DELETE should be enough. It might need a 
  new version of the _editable view which also shows deleted records
  so that they can be displayed.

* there is a special 'update' operation which is an edit without
  relations. This should be a weird hybrid between the published
  version for relations, and the updated version for any fields. When
  publishing, this should take over the relations of the published
  object. the previously published object is archived by itself, without
  relations.

  The updatable record when published is copied to the currently published
  record. Before that the currently published record is copied into an  
  archived record. This isn't going to preserve relations but it is
  efficient.

  Updating *and* editing a record at the same time is an error.

* publishing something that is a relation to a new object. publishing
  something that is a relation to an editable object.

* should we place an index on status? We have one on code.

* when we have a many-to-many relation, what happens if we add a relation
  to one side of it while the other is already an editable version?

* when the delete-orphan cascade rule is in effect, there is a problem
  when copying an object for editing. It needs to be attached to its
  parent, otherwise it will fail with an orphan error, even though
  it is properly attached through the foreign key attribute.

Testing
-------

* publish new relation to unpublished object, what happens?

* direct archiving

* complex example with recursive relations

* make tests clearer by writing lots of small doctests? commenting
  unit tests better? Improved naming scheme?
