Skip to content

Potential bug in Spring data; mapping null to wrapper class throws exception #1167

Closed
@MagdaZny

Description

@MagdaZny

Hi,
I wanted to report a bug I noticed when upgrading Spring Boot 2.5.8 → 2.6.2.
After the upgrade the Jdbc @query when returning null it cannot be mapped to String, as before. Now we get an exception Couldn't find PersistentEntity for type class java.lang.String!.

@Query(
       "UPDATE tableName SET topography = (" +
           "SELECT ST_Multi(ST_Union(s.polygon)) " +
           "FROM tableX s " +
           "WHERE ... "+
           ") " +
           "WHERE ... " +
           "RETURNING ST_AsGeoJson(topography)"
   )
String updateTopography(...);

Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions