'Between' functions on paths should be nullsafe
Bug #782242 reported by
Lieven Doclo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Querydsl |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently, if you have a for example a numberpath, calling path.between(x, y) with one of the bounds being null (which for example can happens if those bounds are omitted by the user, it would be convenient if the between method would delegate to the goe or loe functions when one of the arguments is null.
So that:
path.between(x, null) => path.goe(x)
path.between(null, y) => path.loe(y)
Taken this even further, predicates (except for the isnull and isnotnull predicates) should ignore null passed argument, effectively return a dummy predicate (for example, an empty BooleanBuilder).
Changed in querydsl: | |
status: | New → In Progress |
Changed in querydsl: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Your proposition for between looks good, but I hesitate to take this further, because allowing null for semantically non-null parameters would mask lots of bugs in programs. Querydsl should be safe to use.