Ash FrameworkAF
Ash Framework3y ago
11 replies
jart

Postgrex error when creating record with AshGeo type

I have a resource which contains an attribute defined as:

    attribute :point, AshGeo.Geometry do
      description "The underlying PostGIS geometry"
      allow_nil? false
      constraints geo_types: [Geo.PointZ]
      private? true
    end


when I try and run a test which creates a record I get the following error:

** (Postgrex.QueryError) type `geometry` can not be handled by the types module Postgrex.DefaultTypes


I think this is to do with the Postgrex.Types.define added to the runtime.exs not being used in test?
Was this page helpful?