You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using BlazePersistenceRepositoryFactory with Spring Boot 2.0.4.RELEASE and Hibernate 5.2 integration, a repository with a count query throws an exception at app startup.
Expected behavior
No exception is thrown and the app starts with a working repository.
Actual behavior
Using BlazePersistenceRepositoryFactory with Spring Boot 2.0.4.RELEASE and Hibernate 5.2 integration, a repository with a count query such as
java.lang.IllegalArgumentException: Could not create query metamodel for method public abstract long UserRepository.countByPrimaryEmailAddress(java.lang.String)!
at com.blazebit.persistence.spring.data.impl.repository.BlazePersistenceRepositoryFactory$CreateQueryLookupStrategy.resolveQuery(BlazePersistenceRepositoryFactory.java:190)
at com.blazebit.persistence.spring.data.impl.repository.BlazePersistenceRepositoryFactory$CreateIfNotFoundQueryLookupStrategy.resolveQuery(BlazePersistenceRepositoryFactory.java:229)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lookupQuery(RepositoryFactorySupport.java:553)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$mapMethodsToQuery$1(RepositoryFactorySupport.java:546)
Caused by: java.lang.IllegalArgumentException: DynamicSort must not be null!
at org.springframework.util.Assert.notNull(Assert.java:193)
at org.springframework.data.repository.query.parser.AbstractQueryCreator.createQuery(AbstractQueryCreator.java:94)
at com.blazebit.persistence.spring.data.base.query.AbstractPartTreeBlazePersistenceQuery$CountQueryPreparer.invokeQueryCreator(AbstractPartTreeBlazePersistenceQuery.java:435)
at com.blazebit.persistence.spring.data.base.query.AbstractPartTreeBlazePersistenceQuery$QueryPreparer.<init>(AbstractPartTreeBlazePersistenceQuery.java:224)
at com.blazebit.persistence.spring.data.base.query.AbstractPartTreeBlazePersistenceQuery$CountQueryPreparer.<init>(AbstractPartTreeBlazePersistenceQuery.java:400)
at com.blazebit.persistence.spring.data.base.query.AbstractPartTreeBlazePersistenceQuery.<init>(AbstractPartTreeBlazePersistenceQuery.java:82)
at com.blazebit.persistence.spring.data.impl.query.PartTreeBlazePersistenceQuery.<init>(PartTreeBlazePersistenceQuery.java:38)
at com.blazebit.persistence.spring.data.impl.repository.BlazePersistenceRepositoryFactory$CreateQueryLookupStrategy.resolveQuery(BlazePersistenceRepositoryFactory.java:187)
... 154 more
Steps to reproduce
Create a new Spring project and add Blaze deps.
Configure the app to use BlazePersistenceRepositoryFactory for repositories.
Description
Using
BlazePersistenceRepositoryFactory
with Spring Boot 2.0.4.RELEASE and Hibernate 5.2 integration, a repository with a count query throws an exception at app startup.Expected behavior
No exception is thrown and the app starts with a working repository.
Actual behavior
Using
BlazePersistenceRepositoryFactory
with Spring Boot 2.0.4.RELEASE and Hibernate 5.2 integration, a repository with a count query such asthrows the following exception on app startup:
Steps to reproduce
BlazePersistenceRepositoryFactory
for repositories.Example project: https://github.com/heruan/spring-blaze
Environment
Version: 1.3.0-Alpha2
JPA-Provider: Hibernate 5.2
Spring Boot: 2.0.4.RELEASE
Worth noting that with Spring Boot 2.1.0.M1 and Hibernate 5.3 integration, the exception is not thrown.
The text was updated successfully, but these errors were encountered: