Skip to content

Add new criteriaQuery method to avoid hibernate criteria deprecations.#2028

Merged
arteam merged 2 commits intodropwizard:masterfrom
lightswitch05:feature/criteria-query
Apr 27, 2017
Merged

Add new criteriaQuery method to avoid hibernate criteria deprecations.#2028
arteam merged 2 commits intodropwizard:masterfrom
lightswitch05:feature/criteria-query

Conversation

@lightswitch05
Copy link
Copy Markdown
Contributor

Hibernate deprecated session.createCriteria(<E>).

I added a criteriaQuery() method as a migration path away from criteria(). I considered createCriteriaUpdate and createCriteriaDelete methods as well, but wasn't sure if they would be wanted. Please let me know your thoughts.

@lightswitch05 lightswitch05 force-pushed the feature/criteria-query branch from 2fb3a5c to 1f87c2c Compare April 26, 2017 02:57
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.004%) to 84.491% when pulling 1f87c2c on lightswitch05:feature/criteria-query into ecf06ce on dropwizard:master.

Copy link
Copy Markdown
Member

@arteam arteam left a comment

Choose a reason for hiding this comment

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

Looks good to me!

I don't have anything against createCriteriaUpdate and createCriteriaDelete. I think you can create a pull request and we will consider to include it.

*
* @return a new {@link CriteriaQuery} query
*/
protected CriteriaQuery<E> criteriaQuery() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the builder variable could be omitted because it's used only once.

@lightswitch05 lightswitch05 force-pushed the feature/criteria-query branch from 184b75f to 4b31edf Compare April 26, 2017 12:20
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.002%) to 84.489% when pulling 4b31edf on lightswitch05:feature/criteria-query into ecf06ce on dropwizard:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.002%) to 84.489% when pulling 4b31edf on lightswitch05:feature/criteria-query into ecf06ce on dropwizard:master.

@jplock jplock added this to the 1.2.0 milestone Apr 26, 2017
@arteam arteam merged commit 10dad0f into dropwizard:master Apr 27, 2017
@arteam
Copy link
Copy Markdown
Member

arteam commented Apr 27, 2017

Thanks for the contribution!

aaanders pushed a commit to aaanders/dropwizard that referenced this pull request Sep 20, 2018
dropwizard#2028)

* Add new criteriaQuery method to avoid hibernate criteria deprecations.

* Remove builder variable per code review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants