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
The BooleanBuilder created with a NoArg constructor generates a different query from a BooleanBuilder created with an initial Arg constructor.
This issue does not always occur and has occurred occasionally when building the project multiple.
Steps to reproduce
The BooleanBuilder created with the initial argument constructor produces the expected query, where all conditions (predicate, createDateAfter, and createDateBefore) are applied:
te1_0.delete_date is nullandte1_0.create_date>? andte1_0.create_date<?
On the other hand, the BooleanBuilder created with the no-argument constructor only applies the predicate, and the additional conditions are not correctly applied:
Upon reviewing the BooleanBuilder code, it appears that there might be a difference in how the 'predicate' is initialized between the constructor and the 'and' method.
Observed vs. expected behavior
The BooleanBuilder created with a NoArg constructor generates a different query from a BooleanBuilder created with an initial Arg constructor.
This issue does not always occur and has occurred occasionally when building the project multiple.
Steps to reproduce
The BooleanBuilder created with the initial argument constructor produces the expected query, where all conditions (predicate, createDateAfter, and createDateBefore) are applied:
This would result in a query like:
On the other hand, the BooleanBuilder created with the no-argument constructor only applies the predicate, and the additional conditions are not correctly applied:
This would result in a query like:
The query generated in this case might not be as expected.
Environment
Querydsl version: 5.0.0
Querydsl module:
com.querydsl.core.BooleanBuilder
com.querydsl.core.types.Predicate
Database: H2
JDK: 17
Additional details
Upon reviewing the BooleanBuilder code, it appears that there might be a difference in how the 'predicate' is initialized between the constructor and the 'and' method.
In the constructor:
However, in the 'and' method:
Is there a difference between using ExpressionUtils.extract() function and not using it?
The text was updated successfully, but these errors were encountered: