spring-projects/spring-data-mongodb — pull request #203 by christophstrobl (2014-07-09 07:50:20+00:00)
Title: DATAMONGO-972 - Handle references correctly when using QueryDSL.

**!!! DO NOT MERGE !!!** - it's a discussion base.

`SpringDataMongodbSerializer` now uses the overrides for `isReference` and `asReference` to create the appropriate `DBRef` when serializing.

Therefore we look for the meta-annotation `@Reference` and inspect the given `Path` to determine the property and its meta information like _collection_.

**ATTENTION**
* The change will only take effect when using **QueryDSL 3.4.1** and above. See querydsl/querydsl#803 for details.
* This change requires to run on _java 7_. See spring-projects/spring-data-build#90 for details.

**Run it anyway**
`mvn -Dquerydsl=4.3.1 clean install`