stablekernel / aqueduct

Dart HTTP server framework for building REST APIs. Includes PostgreSQL ORM and OAuth2 provider.
https://aqueduct.io
BSD 2-Clause "Simplified" License
2.41k stars 279 forks source link

Geometry support / PostGIS #770

Open maxa11an opened 4 years ago

maxa11an commented 4 years ago

Since I need to store geometrical data in one of tables. So in order to be able to store the data I firstly created a normal text column type. Then in a new migration, changed the type like this ALTER TABLE areas ALTER COLUMN geom TYPE geometry(GEOMETRYCOLLECTION); and if I manually inserted the data it worked like a charm, but inserting does not work.

This is the following error I get aqueduct: PostgreSQLSeverity.error 23502: null value in column "geom" violates not-null constraint Detail: Failing row contains (52822, Sverige, 2, f, null). Table: areas Column: geom although the data is complete and the geometry string is not null, and it should be able to behave as a string when inserting.

Anyone having a clue of how to continue working with this?

joeconwaystk commented 4 years ago

The database driver Aqueduct uses does not support that type. Please file an issue with the DB driver repo: https://github.com/stablekernel/postgresql-dart/issues.