Closed NikitaKrasavtsev closed 4 years ago
Currently if there is a field of geography type defined like this:
geoPosition: { type: GEOGRAPHY('POINT', 4326), },
and you try to load it in fixtures like this:
.... "geoPosition": {"type": "Point", "coordinates": [39.807222, -76.984722]}, ...
the query that sequelize-fixtures generate to check if the record is in DB contains the following fragment in the WHERE section:
WHERE
...("ResidentialRealEstate"."geoPosition" = ST_GeomFromGeoJSON('{"type":"Point"}') AND "ResidentialRealEstate"."geoPosition" = ST_GeomFromGeoJSON('{"coordinates":[39.807222,-76.984722]}'))...
This should be handled in the same manner as geometry field.
hi, thanks!
Currently if there is a field of geography type defined like this:
geoPosition: { type: GEOGRAPHY('POINT', 4326), },
and you try to load it in fixtures like this:
.... "geoPosition": {"type": "Point", "coordinates": [39.807222, -76.984722]}, ...
the query that sequelize-fixtures generate to check if the record is in DB contains the following fragment in the
WHERE
section:...("ResidentialRealEstate"."geoPosition" = ST_GeomFromGeoJSON('{"type":"Point"}') AND "ResidentialRealEstate"."geoPosition" = ST_GeomFromGeoJSON('{"coordinates":[39.807222,-76.984722]}'))...
This should be handled in the same manner as geometry field.