Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow result set mappings to be embedded directly in @NamedNativeQuery #476

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

gavinking
Copy link
Contributor

@gavinking gavinking commented Aug 19, 2023

and add lockMode to @EntityResult.

see #471, #472

@gavinking gavinking linked an issue Aug 19, 2023 that may be closed by this pull request
@gavinking gavinking linked an issue Aug 19, 2023 that may be closed by this pull request
@gavinking
Copy link
Contributor Author

gavinking commented Aug 21, 2023

Example usage:

@NamedNativeQuery(name = “someQuery",
	query = "select TABLE_NAME as t_name, CURRENT_TIME as t_time from ALL_TABLES where TABLE_NAME = 'AUDIT_ACTIONS'“,
	entities = @EntityResult(entityClass = AllTables.class,
				fields = {
						@FieldResult(name = "tableName", column = "t_name"),
						@FieldResult(name = "daysOld", column = "t_time")
				}))

Copy link
Contributor

@lukasj lukasj left a comment

Choose a reason for hiding this comment

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

LGTM

@lukasj lukasj merged commit 53d4ac0 into jakartaee:master Aug 21, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add lockMode to @EntityResult allow nested result set mappings in @NamedNativeQuery
2 participants