Comments (4)
Thomas Risberg commented
Does your code call setFunction(true)?
That's necessary if you are calling a function.
Also, anything that is part if Spring Framework should go in as a Spring JIRA issue (https://jira.springsource.org/browse/SPR). I'll move this later if necessary.
-Thomas
from spring-data-relational.
Catwalker Liu commented
Yes I did call setFunction(true) after these declareParameter(...)
In code line 132-152 parameterCount is set to -1 for function, but the code also exclude SqlReturnResultSet effectively. (parameterCount++ is inside of instanceof check).
This is double de-count for (function+SqlReturnResultSet) case.
from spring-data-relational.
Thomas Risberg commented
Yes, that is correct - SqlReturnResultSet is used with SQL Server and Sybase that return resultsets from regular stored procedure calls. Didn't think of that initially, and since you are calling a function it's not the right parameter type to use. Depending on the database your parameter would look a bit different. If you are using Oracle try the following:
declareParameter(new SqlOutParameter("rs", oracle.jdbc.OracleTypes.CURSOR, new MyMapper()));
and for Postgres you would use:
declareParameter(new SqlOutParameter("rs", Types.OTHER, new MyMapper()));
Let me know how this works out or if you are using some other database.
-Thomas
from spring-data-relational.
Thomas Risberg commented
I'm closing this issue. If you are still having problems you can open a new Spring Framework issue (https://jira.springsource.org/browse/SPR).
-Thomas
from spring-data-relational.
Related Issues (20)
- Upgrade to Netty 4.1.107.Final
- AggregateReference conversion does not honor custom converters HOT 2
- how to do database sharding HOT 1
- Release 3.1.11 (2023.0.11)
- Release 3.2.5 (2023.1.5)
- Release 3.3 RC1 (2024.0.0)
- support query with `ExampleMatcher` on `AggregateReference` properties HOT 1
- Issue with Column Alias mapping to projection in R2dbcRepository Query
- Spring Data JDBC - Sort.by does not work on nested @Embedded property
- @Query support Slice and Page HOT 4
- NamingStrategy ignored when using slice test @DataJdbcTest HOT 1
- Kotlin value classes in entities fail with IllegalStateException HOT 8
- Upgrade to R2DBC Postgresql 1.0.5.RELEASE
- Align OffsetScrolling to zero-based indexes
- Release 3.1.12 (2023.0.12)
- Release 3.2.6 (2023.1.6)
- Release 3.3 GA (2024.0.0)
- Add support for SQLite HOT 1
- Nested structure not persistable that goes beyond a first level of a parent child relationship HOT 4
- Potential bug found after updating to Spring Boot 3.2.X HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-relational.