Description
Jesse Kuhnert opened DATAMONGO-2104 and commented
The apt-maven-plugin / MongoAnnotationProcessor querydsl generation combination for spring mongo does not appear to be picking up and adding near / distance calculation support to querydsl based queries. We have a Location object nested within our Store document that looks like:
public class Location {
@TextIndexed
private String containedInPlace;
private String country;
@GeoSpatialIndexed(name = "location.geo", type = GeoSpatialIndexType.GEO_2D)
private double[] geo;
@GeoSpatialIndexed(name = "location.geoPoint", type = GeoSpatialIndexType.GEO_2DSPHERE)
private GeoJsonPoint geoPoint;
After we've run the maven plugin :
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>org.springframework.data.mongodb.repository.support.MongoAnnotationProcessor</processor>
<logOnlyOnError>true</logOnlyOnError>
</configuration>
</execution>
</executions>
</plugin>
. the generated QStore.store.location.geoPoint (or the legacy double[] array coordinate) do not have any geo near methods attached as querydsl supposedly supports. The GeoJsonPoint filter generated is a SimplePath class. I've tried this using the latest querydsl dependencies for 4.2.1 release and it still doesn't pick up and recognize that I have a geo data type.
Is this an issue with the maven plugin or with the annotation processor?
Affects: 2.0.10 (Kay SR10)