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
@MappedEntity("\${application.datasource.table-prefix}rabbitmq_outbox")
data class OutboxEntryEntity(
@field:Id
@MappedProperty("id", type = DataType.LONG)
val id: OutboxEntryId? = null,
@MappedProperty("exchange", type = DataType.STRING)
val exchange: String,
@MappedProperty("topic", type = DataType.STRING)
val topic: String,
@MappedProperty("headers", type = DataType.JSON)
val headers: Map<String, Any?>,
@MappedProperty("body", type = DataType.STRING)
val body: String,
)
data class OutboxEntryId(
val value: Long,
) {
override fun toString(): String {
return "OutboxEntryId($value)"
}
}
Calling the findAll method with a Pageable (e.g.: operations.findAll(Pageable.from(0, count))) throws the following :
java.lang.IllegalStateException: Expandable query parts size should be the same as parameters size + 1. 6 != 1 + 1 SELECT outbox_entry_entity_.`id`,outbox_entry_entity_.`exchange`,outbox_entry_entity_.`topic`,outbox_entry_entity_.`headers`,outbox_entry_entity_.`body` FROM `tester_rabbitmq_outbox` outbox_entry_entity_ [SELECT outbox_entry_entity_.`id`, outbox_entry_entity_.`exchange`, outbox_entry_entity_.`topic`, outbox_entry_entity_.`headers`, outbox_entry_entity_.`body` FROM `tester_rabbitmq_outbox` outbox_entry_entity_, ]
at io.micronaut.data.runtime.operations.internal.sql.DefaultSqlStoredQuery.<init>(DefaultSqlStoredQuery.java:68)
at io.micronaut.data.runtime.operations.internal.sql.AbstractSqlRepositoryOperations.decorate(AbstractSqlRepositoryOperations.java:189)
at io.micronaut.data.runtime.intercept.AbstractQueryInterceptor.findStoreQuery(AbstractQueryInterceptor.java:245)
at io.micronaut.data.runtime.intercept.AbstractQueryInterceptor.prepareQuery(AbstractQueryInterceptor.java:230)
at io.micronaut.data.runtime.intercept.DefaultFindSliceInterceptor.intercept(DefaultFindSliceInterceptor.java:55)
at io.micronaut.data.runtime.intercept.DataIntroductionAdvice.intercept(DataIntroductionAdvice.java:83)
at io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:143)
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
micronaut 4.7.0, micronaut-data 4.10.x
The text was updated successfully, but these errors were encountered:
meriouma
changed the title
Pageable : Expandable query parts size should be the same as parameters size + 1
Expandable query parts size should be the same as parameters size + 1
Nov 17, 2024
I tried to reproduce issue but not reproducing it. Here is the example created based on your posted model and repo mn-kotlin-jdbc-pageable.zip
with minor difference - I had to add converter for the id field, not sure how the save is working for you. But, it should not affect behavior with pageable. Please review this example and add what is missing to reproduce the issue.
Expected Behavior
Everything works as with micronaut-data 4.9.x
Actual Behaviour
I have this repository setup :
Calling the
findAll
method with aPageable
(e.g.:operations.findAll(Pageable.from(0, count))
) throws the following :Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
micronaut 4.7.0, micronaut-data 4.10.x
The text was updated successfully, but these errors were encountered: