SpringSource/grails-data-mapping — pull request #130 by tomwidmer (2013-06-10 19:56:09+00:00)
Title: GPMONGODB-300

These are the hooks required to implement various functionalities, including the query transformer plugin mentioned in GPMONGODB-300:

* Add new SessionCreationEvent - allows plugins/applications to customise a session when it's created
* Add new PreQueryEvent and PostQueryEvent - allows interception of queries (and query results)
* Add session properties methods to Session interface, which aren't removed by a 'clear' - allows arbitrary information to be attached to sessions
* Add test cases for each item above.

That plugin is written and tested with these changes, but I won't attempt to publish it until I've added some more end-user friendly features to the DSL and also until mongodb 1.3.0.GA is released (hopefully with this change). The changes should be compatible with the master branch (and with hibernate), though I haven't tested this.

The features above could potentially be used to re-implement quite a bit of existing functionality (e.g. caching of query results, etc.) and to reduce coupling in the code base.

See also http://markmail.org/message/23joaesydthfgdfn