codemix/oriento — pull request #147 by phpnode (2014-11-24 15:37:27+00:00)
Title: add db.registerTransformer()

allows registering transformers at the database level, can be used to automatically convert documents into model instances according to their class, e.g.

```js
var UserModel = require('./models/user');

db.registerTransformer('OUser', UserModel);

db.select().from('OUser').limit(1).one().then(function (user) {
user instanceof UserModel; // true, assuming UserModel supports instantiation without `new`
});

```