Skip to content

Commit

Permalink
Move Spring Data JPA classes to panache to avoid dev-mode CL issue
Browse files Browse the repository at this point in the history
Fixes #6214
  • Loading branch information
geoand authored and gsmet committed Dec 16, 2019
1 parent 80b4f45 commit 6b234f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -9,6 +9,8 @@
import io.quarkus.panache.common.Parameters;
import io.quarkus.panache.common.Sort;

//TODO this class is only needed by the Spring Data JPA module and would be placed there it it weren't for a dev-mode classloader issue
// see https://github.com/quarkusio/quarkus/issues/6214
public class AdditionalJpaOperations {

@SuppressWarnings("rawtypes")
Expand All @@ -19,7 +21,6 @@ public static PanacheQuery<?> find(Class<?> entityClass, String query, String co
Query jpaQuery = em.createQuery(sort != null ? findQuery + JpaOperations.toOrderBy(sort) : findQuery);
JpaOperations.bindParameters(jpaQuery, params);
return new CustomCountPanacheQuery(em, jpaQuery, findQuery, countQuery, params);
// return new PanacheQueryImpl(em, jpaQuery, findQuery, params);
}

@SuppressWarnings("rawtypes")
Expand All @@ -35,6 +36,5 @@ public static PanacheQuery<?> find(Class<?> entityClass, String query, String co
Query jpaQuery = em.createQuery(sort != null ? findQuery + JpaOperations.toOrderBy(sort) : findQuery);
JpaOperations.bindParameters(jpaQuery, params);
return new CustomCountPanacheQuery(em, jpaQuery, findQuery, countQuery, params);
// return new PanacheQueryImpl(em, jpaQuery, findQuery, params);
}
}
Expand Up @@ -3,6 +3,8 @@
import javax.persistence.EntityManager;
import javax.persistence.Query;

//TODO this class is only needed by the Spring Data JPA module and would be placed there it it weren't for a dev-mode classloader issue
// see https://github.com/quarkusio/quarkus/issues/6214
public class CustomCountPanacheQuery<Entity> extends PanacheQueryImpl<Entity> {

private final String customCountQuery;
Expand Down

0 comments on commit 6b234f9

Please sign in to comment.