You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the test, the following exception is thrown, I might be misunderstanding how to use WindowIterator and keyset properly.
Thank you in advance for your help.
org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 2
at org.springframework.dao.support.DataAccessUtils.nullableSingleResult(DataAccessUtils.java:193)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:253)
at org.springframework.data.jdbc.repository.query.AbstractJdbcQuery.lambda$singleObjectQuery$2(AbstractJdbcQuery.java:131)
at org.springframework.data.jdbc.repository.query.PartTreeJdbcQuery.execute(PartTreeJdbcQuery.java:134)
at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:170)
at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:158)
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:169)
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:148)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.data.repository.core.support.MethodInvocationValidator.invoke(MethodInvocationValidator.java:95)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223)
at org.springframework.data.jdbc.repository.$Proxy102.findFirst2ByIdPropGreaterThanOrderByName(Unknown Source)
at org.springframework.data.jdbc.repository.JdbcRepositoryIntegrationTests.lambda$findByKeysetPosition$15(JdbcRepositoryIntegrationTests.java:1169)
at org.springframework.data.support.WindowIterator.hasNext(WindowIterator.java:81)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
at org.springframework.data.jdbc.repository.JdbcRepositoryIntegrationTests.findByKeysetPosition(JdbcRepositoryIntegrationTests.java:1175)
The text was updated successfully, but these errors were encountered:
We do, see #1605 for tracking progress. We just don't know when it will happen. It will also have a restriction on working for derived queries only as we do not want to get into SQL parsing.
Hi,
I will post a reproducer of the error. (I have checked out the
3.3.4
tag of thespring-data-relational
project.Add the following query method to
org.springframework.data.jdbc.repository.JdbcRepositoryIntegrationTests.DummyEntityRepository
and the following test method to
org.springframework.data.jdbc.repository.JdbcRepositoryIntegrationTests
When running the test, the following exception is thrown, I might be misunderstanding how to use
WindowIterator
andkeyset
properly.Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: