jakartaee / jakartaee/data

Do we want to support a boolean return value for @Query("UPDATE... ?

Open
#925 2 comments 0 reactions 0 assignees View on GitHub
design documentation enhancement
Dominant language
Java
Stars
150
Forks
37
Avg merge
4d 4h
Merged PRs (30d)
34

Description

Currently the Query Javadoc requires void, int, or long.

A TCK test was testing a boolean return type, but is being changed in #924 as the resolution to challenge #923 because the Javadoc does not currently permit boolean.

`boolean` would be trivial to implement, with true corresponding to a numeric result > 0, and false corresponding to a numeric result of 0.

`boolean` could be convenient when writing an DELETE or UPDATE statement (such as the one in the TCK) where there can be at most 1 matching entity, often due to querying based on the Id.

I'm fine with adding `boolean`, but the spec is also okay without it.

Contributor guide

Open the contributing guide

Research direction

Start with the Query Javadoc and the TCK test mentioned in the issue, then review the related resolutions in #923 and #924. The work is not ready to begin until the project decides whether boolean return values should be supported; done would require the corresponding specification and test changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.