Skip to content

UUID Specification translated without cast to text #3769

Closed
@amihaescu

Description

Setup

I have upgraded a SpringBoot application built with Gradle to the latest version (3.4.2).
The application uses Postgis:15.4.3.

build.gradle.kts

  id("org.springframework.boot") version "3.4.2" // from 3.3.5
...
dependencyManagement {
  imports {
    mavenBom("org.springframework.cloud:spring-cloud-dependencies:2024.0.0") // from 2023.0.4
  }
}

Problem

I have a class that helps me build a pretty complex org.springframework.data.jpa.domain.Specification that filters on a UUID field. The filed is of type UUID both in the application and in the database

The UUID field code field in the query below that Spring generates.

Before the upgrade the SQL generated was (3.3.5)

...
  and upper(cast(c1_0.code as text)) like ? escape ''
....

After the upgrade (3.4.2)

...
  and upper(c1_0.code) like ? escape ''
....

Error

When executing the query I get this error
Caused by: org.postgresql.util.PSQLException: ERROR: function upper(uuid) does not exist
It seems obvious that the cast is missing. I have also tried using postgis:17 and got the same issue.

I don't know if this is the right project to open this issue against. Thank you.

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions