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 implementing a repository event handler in Kotlin, marking it as suspend fun causes an IllegalArgumentAxception: "wrong number of arguments".
After some digging I found that a suspending function compiles to method expecting a kotlin.coroutines.Continuation as second parameter, and it seems to be unable to resolve this.
@Component
@RepositoryEventHandler(MyEntity::class)
class MyEntityEventHandler() {
@HandleBeforeDelete
suspend fun handleMyEntityDelete(value: MyEntity) {
// logic
}
}
The text was updated successfully, but these errors were encountered:
mp911de
changed the title
Repository event handler throws "wrong number of arguments" when using suspending function [Kotlin]
Add Coroutines support for repository event handler
Nov 4, 2024
When implementing a repository event handler in Kotlin, marking it as
suspend fun
causes anIllegalArgumentAxception
: "wrong number of arguments".After some digging I found that a suspending function compiles to method expecting a
kotlin.coroutines.Continuation
as second parameter, and it seems to be unable to resolve this.The text was updated successfully, but these errors were encountered: