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

Revisit the MutinyGenerator Api #1741

Closed
DavideD opened this issue Aug 31, 2023 · 0 comments · Fixed by #1742
Closed

Revisit the MutinyGenerator Api #1741

DavideD opened this issue Aug 31, 2023 · 0 comments · Fixed by #1742
Assignees
Labels
design A design or implementation issue

Comments

@DavideD
Copy link
Member

DavideD commented Aug 31, 2023

Currently, MutinyGenerator#generator looks like this:

public abstract Uni<Object> generate(...);

I think it should be Uni<?> to avoid the need of additional casts or conversions.

See quarkusio/quarkus#32665 (comment)

@DavideD DavideD self-assigned this Aug 31, 2023
@DavideD DavideD added the design A design or implementation issue label Aug 31, 2023
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Aug 31, 2023
We `Uni<?>` we can avoid an additional redundant conversion
before returning the value in some situations.

For example, if the return value is the result of a native
query:
```
return session.createNativeQuery("...", Long.class).getSingleResult();
```

This is useful because with native queries we don't always know in advance
what value will be returned. And using Object.class might cause
ClassCastExceptions along the way.
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Aug 31, 2023
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Aug 31, 2023
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Aug 31, 2023
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Aug 31, 2023
The Oracle driver doesn't support passing a RowId as parameter of a
query
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Aug 31, 2023
The Oracle driver doesn't support passing a RowId as parameter of a
query
DavideD added a commit that referenced this issue Sep 1, 2023
We `Uni<?>` we can avoid an additional redundant conversion
before returning the value in some situations.

For example, if the return value is the result of a native
query:
```
return session.createNativeQuery("...", Long.class).getSingleResult();
```

This is useful because with native queries we don't always know in advance
what value will be returned. And using Object.class might cause
ClassCastExceptions along the way.
DavideD added a commit that referenced this issue Sep 1, 2023
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Sep 1, 2023
The Oracle driver doesn't support passing a RowId as parameter of a
query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design A design or implementation issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant