Skip to content

Conversation

@gavinking
Copy link
Member

@gavinking gavinking commented Sep 14, 2024

Redo of #5851.

  • replaces FlushModeType in the annotation package

  • much less confusing when applied to a Query

    • what do MANUAL and COMMIT mean for a Query?
    • how is AUTO useful for a Query?
  • also make Query.getHibernateFlushMode() obey its documented semantics by returning the session flush mode instead of null when unset

[Please describe here what your change is about]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-15942

.setTimeout(timeout < 0 ? null : timeout)
.setFetchSize(fetchSize < 0 ? null : fetchSize)
.setFlushMode(getFlushMode(namedNativeQuery.flushMode()))
.setFlushMode(getFlushMode(namedNativeQuery.flush(), namedNativeQuery.flushMode()))

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [NamedNativeQuery.flushMode](1) should be avoided because it has been deprecated.
.setTimeout(timeout < 0 ? null : timeout)
.setFetchSize(fetchSize < 0 ? null : fetchSize)
.setFlushMode(getFlushMode(namedQuery.flushMode()))
.setFlushMode(getFlushMode(namedQuery.flush(), namedQuery.flushMode()))

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [NamedQuery.flushMode](1) should be avoided because it has been deprecated.
…shes or not

- replaces FlushModeType in the annotation package
- much less confusing when applied to a Query
  * what do MANUAL and COMMIT mean for a Query?
  * how is AUTO useful for a Query?

- also make Query.getHibernateFlushMode() obey its
  documented semantics by returning the session
  flush mode instead of null when unset
@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Sep 15, 2024

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [8a12323]

› This message was automatically generated.

@gavinking gavinking merged commit 2fc51bd into hibernate:main Sep 15, 2024
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.

1 participant