Skip to content

Commit

Permalink
Deprecate the native Hibernate criteria API in AbstractDAO
Browse files Browse the repository at this point in the history
Hibernate has deprecated it and since Hibernate 5.2 it's advised to use
the JPA Criteria API. We have implemented support for it in
Dropwizard 1.2, therefore Dropwizard users should be encouraged
to use it.
  • Loading branch information
arteam committed Feb 11, 2018
1 parent 45864da commit 7724f2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Expand Up @@ -49,7 +49,9 @@ protected Session currentSession() {
*
* @return a new {@link Criteria} query
* @see Session#createCriteria(Class)
* @deprecated Use {@link AbstractDAO#criteriaQuery()} instead.
*/
@Deprecated
protected Criteria criteria() {
return currentSession().createCriteria(entityClass);
}
Expand Down
Expand Up @@ -26,6 +26,7 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

@SuppressWarnings("deprecation")
public class AbstractDAOTest {
private static class MockDAO extends AbstractDAO<String> {
MockDAO(SessionFactory factory) {
Expand Down

0 comments on commit 7724f2d

Please sign in to comment.