Skip to content

align naming of QueryOptions/StatementOptions with new Query/Statement distinction#933

Open
gavinking wants to merge 2 commits intojakartaee:mainfrom
gavinking:rename-query-options
Open

align naming of QueryOptions/StatementOptions with new Query/Statement distinction#933
gavinking wants to merge 2 commits intojakartaee:mainfrom
gavinking:rename-query-options

Conversation

@gavinking
Copy link
Member

See #806.

@gavinking gavinking marked this pull request as ready for review January 27, 2026 21:36
@gavinking gavinking added candidate-for-4 Good candidate for JPA 4 PRIORITY labels Feb 20, 2026
@gavinking gavinking force-pushed the rename-query-options branch from 22da0bc to 32c113f Compare February 26, 2026 07:49
@gavinking
Copy link
Member Author

gavinking commented Feb 26, 2026

I believe this one should just be merged. Any objections??

Copy link
Member

@njr-11 njr-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure these names are an improvement over what we already had. I suppose it depends on what we see as the more dominant use case for them.

If we were only considering Jakarta Data, the term Statement doesn't have a particular meaning. Some users might think of java.sql.Statement, which is a common to queries that perform find operations as well as deletes and updates and even insert. In Jakarta Data, UPDATE and DELETE are performed by @Query, @StaticQuery, and @StaticNativeQuery which fit nicely with the existing @WriteQueryOptions (or @ReadQueryOptions if instead a SELECT query). The position from Jakarta Data should be that existing names are a very good fit, and a change to @StatementOptions and @TypedQueryOptions do not match up with existing terminology in the spec, lessening the usability.

Considering Jakarta Persistence, the alignment with new API classes there makes more sense.

I'm probably biased, but I would opt for the better alignment with Jakarta Data here.

@gavinking
Copy link
Member Author

Hrmph OK I had not looked at it like that.

I don't have a useful response right now, let me think it over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

candidate-for-4 Good candidate for JPA 4 PRIORITY

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants