Merge branch 'release/0.5.0' into develop
Merge branch 'hotfix/0.5.1' into develop
Added support for placing domain logic in a model.retrieved() method. Hooks can also be used on this method.
model.retrieved() now accepts callbacks so more complex manipulation can occur in these hooks.
model.retrieved() instance method added which will be called automatically when a document is retrieved from the database. Hooks with callbacks can be added to this to manipulate retrieved data.
Fixed up how metadata is set within Model instances since it turns out it was being overridden by util.inherits().
Documents are now stored with _model metadata for a faux polymorphism effect when searching a mix of inherited models.
Had to bring back the inherits() method since I think util.inherits() will mess with the hooks - need to add tests for this.
Minor inheritance bug fixes.
model.retrieved() and related hooks now get passed a tenant argument when present.
Final fixes to inheritance so it works as expected in a variety of different scenarios.
util.inherits() support is the big feature added, but also other miscellaneous bug fixes.
Version bump - 0.6.0
Merge branch 'release/0.6.0'