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
After debug, I found bug in org.springframework.data.jpa.repository.query.QueryUtils.
importorg.junit.jupiter.api.Test;
importorg.springframework.data.jpa.repository.query.QueryUtils;
publicclassQueryUtilsTest {
@TestvoidqueryUtilsWrongAliasDetection(){
finalStringquery = "select p from Some p where (:periodFrom is null or p.periodFrom = :periodFrom)";
finalStringactual = QueryUtils.detectAlias(query);
assertEquals("p", actual);
}
}
The text was updated successfully, but these errors were encountered:
The core issue is #2260 (#2521 was the related PR).
Indeed, this issue now passes...
@Test// GH-2535voidqueryUtilsWrongAliasDetection() {
assertThat(QueryUtils.detectAlias("select p from Some p where (:periodFrom is null or p.periodFrom = :periodFrom)"))
.isEqualTo("p");
}
I have a query with parameter named periodFrom. So i have an error if i pass order parameter to JPA repository method
After debug, I found bug in org.springframework.data.jpa.repository.query.QueryUtils.
The text was updated successfully, but these errors were encountered: