ravendb/ravendb — pull request #509 by jpatte (2013-03-17 14:58:11+00:00)
Title: Added IExtendedConversionListener

This pull request adds a new hook that supersedes the actual IConversionListener by
adding 2 more extension points in the document/entity conversion
operation. This hook is called **IExtendedConversionListener** to avoid introducing any breaking changes.

This new listener has 4 methods, which are called **before and after** the document to entity and entity to document operations - while the actual IConversionListener is only called *after* these operations.

The main interest of this new hook relies in its BeforeConversionToEntity() extension point. This can be used to transform an existing document before converting it into an entity, which allows data migration scenarios similar to the one described in [Ayende's post](http://ayende.com/blog/66563/ravendb-migrations-rolling-updates) but with a lot more flexibility. You could "upgrade" your document in any way you want - for instance using several successive steps - without relying on the current type definition of the entity being instanciated. This would make migration operations a lot easier to write and maintain.