PostGIS issues with 0.6
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 2.2k
- Forks
- 379
- Avg merge
- 14m
- Merged PRs (30d)
- 8
Description
When using this method to fetch a table entry with a MultiPolygon field:
override def fetch(id: model.SubmarketId): F[Submarket] =
selectById(id)
.query[Submarket]
.unique
.transact(xa)
I get the following error:
doobie.util.invariant$InvalidObjectMapping: SQL object of class org.postgresql.util.PGobject cannot be cast to mapped class org.postgis.PGgeometry.
Is it possible that this is a compatibility issue with Postgres 10? This repo is also using Postgis and doobie 0.6
Here is the Submarket case class for reference:
final case class Submarket(
id: SubmarketId,
name: NonEmptyString,
shape: MultiPolygon,
marketId: MarketId
)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the fetch method using selectById, query[Submarket], and unique, then inspect how the MultiPolygon shape is mapped with doobie 0.6, PostgreSQL 10, and PostGIS. Reproduce the PGobject-to-PGgeometry error and determine whether the mapping works for the shown Submarket case class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, scala
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100