Menu

#136 JPAUtils query builder

open
nobody
5
2012-12-13
2009-09-24
No

Hi,

If the base Sql is not well formed with brackets (,but good for an sql interpreter) the gridParams.filteredColumns do not joined into the where clause correctly.But I am not sure exactly because possible it is a feature if where clause contains the is null condition.
If possible please correct this problem.

Thanks, Attila.

BaseSQL
-----------
Wellformed: SELECT e FROM PlaceGroP e WHERE ((e.grflg IS NULL) OR (e.grflg='0')) ORDER BY e.grcop
Result:
SELECT id, ,,, FROM place_gro_p WHERE (
((grflg IS NULL) OR (grflg = ?))
AND
((gramb = ?) OR (gramb = ?))
)
ORDER BY grcop ASC

Malformed: SELECT e FROM PlaceGroP e WHERE (e.grflg IS NULL) OR (e.grflg='0') ORDER BY e.grcop
Result:
SELECT id, ,,, FROM place_gro_p WHERE (
(grflg IS NULL)
OR
(
(grflg = ?)
AND
((gramb = ?) OR (gramb = ?))
)
)
ORDER BY grcop ASC

Discussion

MongoDB Logo MongoDB