FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...


v1.0.2 Public


Version any orm entity for easy rollbacks


box install cborm-versioning


Automatic Versioning

If the entity has a verisioned attribute on the entities, the module will create a version of that entity. Installing registers an interceptor on all ORMPreInsert and ORMPreUpdate events to version entities.

Manual Versioning

You can also manually create a version. Doing so skips the check for the versioned attribute.

var versioner = wirebox.createInstance( "[email protected]" );
versioner.version( myEntity );

Restoring Entities from Versions

Once you have a version, restoring it to an entity is simple:

var version = entityNew( "[email protected]" ).get( id );
var restoredEntity = version.restore();
// then if you want this to be the new current version;

Automatic Pruning of Old Versions

If you set a numeric value (n) for your versioned attribute (e.g. versioned="4" ), then the module will delete all versions in excess of n after creating a version. By default, cborm-versioning doesn't delete any versions.

Dependencies (1)

Dev Dependencies (2)


$ box install cborm-versioning

No collaborators yet.
4.50 / 2
  • {{ getFullDate("Oct 02 2017 11:10 AM GMT") }}
  • {{ getFullDate("Oct 02 2017 11:10 AM GMT") }}
  • 1,719
  • 0
  • 5,083