Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@WritingConverter does not properly convert string to ltree in Postgres #2002

Open
wodinga opened this issue Feb 24, 2025 · 1 comment
Open
Labels
status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged

Comments

@wodinga
Copy link

wodinga commented Feb 24, 2025

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 24, 2025
@mp911de
Copy link
Member

mp911de commented Feb 25, 2025

If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem.
You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants