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
The select statement should return data without failing
Actual Behaviour
The select statement throws an exception as micronaut calls hibernate's executeUpdate instead of a select:
org.hibernate.query.IllegalMutationQueryException: Expecting a native mutation query, but found `SELECT * FROM task t WHERE t.request_id = :requestId AND t.status = :status
AND JSON_CONTAINS(t.parent_ids, :parentId) = true
FOR UPDATE
Downgrading to micronaut 4.6.0 (micronaut-data 4.9.0) resolves the issue
Steps To Reproduce
Create a repository with the following:
@Query(value = """ SELECT * FROM task t WHERE t.request_id = :requestId AND t.status = :status AND JSON_CONTAINS(t.parent_ids, :parentId) = true FOR UPDATE """, nativeQuery = true)
publicabstractList<Task> tasksWithParentId(StringrequestId, StringparentId, Stringstatus);
Execute the query with any parameters
Environment Information
Micronaut 4.7.1
Micronaut data 4.10.4
JDK 22
Example Application
No response
Version
4.7.1
The text was updated successfully, but these errors were encountered:
Expected Behavior
The select statement should return data without failing
Actual Behaviour
The select statement throws an exception as micronaut calls hibernate's
executeUpdate
instead of a select:Downgrading to micronaut
4.6.0
(micronaut-data4.9.0
) resolves the issueSteps To Reproduce
Environment Information
Example Application
No response
Version
4.7.1
The text was updated successfully, but these errors were encountered: