Welcome Guest, you are in: Login

dbones docs


Navigation (ArmChair)

Search the wiki

Revision field name

Modified on 2014/09/14 23:12 by Dave Categorized as Uncategorized


In this article we will look at support for the RevisionField, and how we can customize it.

Revision Field

The revision field is how we can achieve optimistic concurrency (For more information)

This is a required field and it has to be located on the Aggregate root.

Supported Patterns

Out of the box ArmChair will try and find the Revision Field for you and it will check for the following

  • Field called "rev" or "_rev"
  • Auto Property called "Rev" or "Revision" or "ClassNameRevision" or "ClassNameRev"

Setting the Revision for a Single Type

Its quite simple, all we have to do is tell the RevisionAccessor what the Field is called.

You only need to call this setup once (and only if the auto scanning pattern does not support your field)

//Via a auto-property
Database.Settings.RevisionAccessor.SetUpRevision<Person>(x => x.NameOfRevision);

//via the fields name

//via the field info
dbones docs, is a sub-site of dbones.co.uk, all its content belongs to dbones.co.uk, this also includes logo's.