When creating a Writing converter to convert from string to to ltree, it runs, but it doesn't actually convert to ltree.
@WritingConverter
class LtreeWritingConverter : Converter < String, PGobject > {
override fun confvert(source: String): PGobject {
return PGObject().apply {
type = "ltree"
value = source
}
}
}
Workaround:
CREATE CAST (varchar AS ltree) WITH INOUT AS IMPLICIT;
This allows us to write strings as ltrees in the Postgres DB