We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I used @procedure annotation to call a stored procedure in a MS SQL-Server and it create one argument too many. I tried with @query and it's ok.
@Procedure(procedureName = "import.SP_CreateImport") Integer createImport(String categoryCode, String typeCode, String name);
result in
bdo-connector-1 | 2024-10-18T14:11:58.212Z DEBUG 1 --- [bdo-timsheet-extractor] [ main] org.hibernate.SQL : bdo-connector-1 | {call import.SP_CreateImport(?, ?, ?, ?)} bdo-connector-1 | Hibernate: bdo-connector-1 | {call import.SP_CreateImport(?, ?, ?, ?)} bdo-connector-1 | 2024-10-18T14:11:58.265Z WARN 1 --- [bdo-timsheet-extractor] [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 8144, SQLState: S0002 bdo-connector-1 | 2024-10-18T14:11:58.266Z ERROR 1 --- [bdo-timsheet-extractor] [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : Procedure or function SP_CreateImport has too many arguments specified.
@Query(value = "{CALL import.SP_CreateImport(:categoryCode, :typeCode, :name)}", nativeQuery = true) Integer createImport(@Param("categoryCode") String categoryCode, @Param("typeCode") String typeCode, @Param("name") String name);
bdo-connector-1 | 2024-10-18T14:27:43.417Z DEBUG 1 --- [bdo-timsheet-extractor] [ main] org.hibernate.SQL : bdo-connector-1 | {CALL import.SP_CreateImport(?, ?, ?)} bdo-connector-1 | Hibernate: bdo-connector-1 | {CALL import.SP_CreateImport(?, ?, ?)} bdo-connector-1 | 2024-10-18T14:27:43.488Z WARN 1 --- [bdo-timsheet-extractor] [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 50001, SQLState: S0001 bdo-connector-1 | 2024-10-18T14:27:43.489Z ERROR 1 --- [bdo-timsheet-extractor] [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : Impossible to find import category [IMPORT -> CATEGORY -> XXX]
I still have work to do but the last issue lies in my SQL stored procedure, not in Java.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I used @procedure annotation to call a stored procedure in a MS SQL-Server and it create one argument too many.
I tried with @query and it's ok.
With @procedure
result in
With @query
result in
I still have work to do but the last issue lies in my SQL stored procedure, not in Java.
The text was updated successfully, but these errors were encountered: