Add __type property to GeoPoint fields in PostgresStorageAdapter (#3695)

* Add __type property to GeoPoint fields in PostgresStorageAdapter

* Add test to check __type on GeoPoint queries
This commit is contained in:
zhoul-HS
2017-04-07 14:44:12 +03:00
committed by Florent Vilmart
parent 0add7c0c50
commit 52828683ba
2 changed files with 24 additions and 0 deletions

View File

@@ -1074,6 +1074,7 @@ export class PostgresStorageAdapter {
}
if (object[fieldName] && schema.fields[fieldName].type === 'GeoPoint') {
object[fieldName] = {
__type: "GeoPoint",
latitude: object[fieldName].y,
longitude: object[fieldName].x
}