DATAJPA-159 - Improved error message if building a PartTreeJpaQuery fails.
This commit is contained in:
@@ -89,7 +89,12 @@ public final class JpaQueryLookupStrategy {
|
||||
@Override
|
||||
protected RepositoryQuery resolveQuery(JpaQueryMethod method, EntityManager em, NamedQueries namedQueries) {
|
||||
|
||||
return new PartTreeJpaQuery(method, em);
|
||||
try {
|
||||
return new PartTreeJpaQuery(method, em);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new IllegalArgumentException(String.format("Could not create query metamodel for method %s!",
|
||||
method.toString()), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user