Coder Social home page Coder Social logo

ERROR [procedure name] is not a procedure with Postgres 12 after upgrading from Spring Boot 3.0.3 to >= 3.1.0 about spring-data-jpa HOT 4 CLOSED

fvclaus avatar fvclaus commented on May 31, 2024
ERROR [procedure name] is not a procedure with Postgres 12 after upgrading from Spring Boot 3.0.3 to >= 3.1.0

from spring-data-jpa.

Comments (4)

fvclaus avatar fvclaus commented on May 31, 2024 1

Thanks. I think I have figured it out. Since Postgres 11, real stored procedures are supported (not just functions). If I change my code from FUNCTION to PROCEDURE, the test succeeds with 3.2.3 (but not with 3.0.3). I also scrolled through the Hibernate release notes (between 6.1.7 and 6.2.2), but couldn't find anything.

from spring-data-jpa.

mp911de avatar mp911de commented on May 31, 2024

I'm able to reproduce the same issue with calling the entity manager directly:

StoredProcedureQuery someProcedure = em.createStoredProcedureQuery("some_procedure");
someProcedure.registerStoredProcedureParameter("some_id", String.class, ParameterMode.IN);
someProcedure.setParameter("some_id", "42");
someProcedure.execute();

You can rewrite your Spring Data repository query method to the following form to consume the return value:

@Query(value = "SELECT some_procedure(:some_id)", nativeQuery = true)
long someProcedure(@Param("some_id") String id);

from spring-data-jpa.

fvclaus avatar fvclaus commented on May 31, 2024

That's fine with. We don't have automated test for those calls, but it is not such a big deal to retest the whole application. Do you mind explaining why this is not going to be fixed? @Procedure worked before and I couldn't find any release notes that this changed.

from spring-data-jpa.

mp911de avatar mp911de commented on May 31, 2024

The change has happened inside of Hibernate so that isn't something we can fix. We can only outline how you could work around that issue.

from spring-data-jpa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.