Liquibase and geometry type

It’s easy to create a point, polygon… with the studio
But Liquibase generate a changelog with geometry as varchar.

<column name="POINT" type="varchar(100 BYTE)"/>

It’s not the best choice by exemple on postgres with postgis where type point, polygon… exists.

When I tried to change the behevior with TypeMapping I get

 <property name="jmixCustomType.geoPoint"
              value="varchar"
              dbms="hsqldb"/>
    <property name="jmixCustomType.geoPoint"
              value="point"
              dbms="postgresql"/>
    <property name="jmixCustomType.geoPolygon"
              value="varchar"
              dbms="hsqldb"/>
    <property name="jmixCustomType.geoPolygon"
              value="polygon"
              dbms="postgresql"/>
    <property name="offsetDateTime.type"
              value="timestamp with time zone"
              dbms="hsqldb"/>
    <property name="offsetDateTime.type"
              value="timestamp with time zone"
              dbms="postgresql"/>
…
    <column name="POINT"
            type="${jmixCustomType.geoPoint}(100)"/>
    <column name="POLYGON"
            type="${jmixCustomType.geoPolygon}(4000)"/>
       

it’s look good.

But the application doesn’t work well with that, as if the ORM continue to use varchar type but not the database.

Same behavior Jmix 1 and 2…

Should I create the @Converter myself or have I missed something in the maps addon? ?

Hello!

Unfortunately, the Maps add-on is built without considering integration with PostGIS. We didn’t investigated PostGIS integration, so probably something may not work.

You can try to create your own Converter or even custom Datatype, but I’m not sure will it be enough to work. Probably, you’ll have to provide the correct type to store in database or even provide correct type mapping for Eclipselink.