Example of Returning in a INSERT

I’m having a permissions problem at my workplace, related to auto-increments, I investigated and realized that Hibernate when doing an insert of the auto-increment type does a “Returning” to retrieve the auto-generated id, could you give me an example of how the query would look like? I didn’t find any examples, and I must give an example to request the permissions

It’s an IBM I database, I don’t know if there is an example of a native query or at least in JPQL, thanks in advance

I think you might be affected by HHH-18642. Please try to update to Hibernate ORM 6.6.4.Final and let us know if that fixes the problem for you.

As soon as they release the Spring 3.4.1 update to Maven I will try it.

You can update already if you want, just declare a dependency on the hibernate-core artifact with that particular version.