We're updating the issue view to help you get more done. 

Introduce @GeoPointField to replace @GeoPointBridge (previously @Spatial) when used on properties


@GeoPointBridge currently covers two use cases:

  • Mapping a type to a geo-point field, labelling the properties to extract the latitude and longitude from with @Latitude and @Longitude.

  • Mapping a property of type GeoPoint to a geo-point field.

But currently, simply using @GenericField on a property of type GeoPoint works just fine.

I think it would be simpler to remove support for property mapping from @GeoPointBridge, rename it to @GeoPointTypeBridge, and just expose a @GeoPointField annotation, even if it does not offer anything more than what @GenericField offers at the moment.

That way:

  • When mapping a property to a geo-point, we would allow the use of ValueBridge and container extractors (Optional<GeoPoint>, anyone?)

  • Mapping a property to a geo-point field would be consistent with how we map properties of other types.

  • Mapping a type to a geo-point field would be clearly separated and could be documented more easily.

  • Both use cases could offer the same parameters, if we add any in the future.

  • There would still be a clear annotation to map a geo-point.

Theoretically, @GeoPointTypeBridge could even expose a @GeoPointField field() attribute to configure the geo-point field. We would not be able to support the value bridge and container extraction when using @GeoPointTypeBridge at the moment, however, so maybe that's not such a great idea.







Yoann Rodière


Fix versions