Project

General

Profile

Feature #1919

update HQLPreprocessor and calling code to better handle WHERE TRUE and WHERE FALSE cases

Added by Eric Faulhaber over 11 years ago. Updated over 7 years ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
version:

History

#1 Updated by Eric Faulhaber over 11 years ago

Runtime where clause optimizations can roll up a where clause such that the result passed to Hibernate is simply WHERE TRUE or WHERE FALSE. We have had to tweak the Hibernate HQL parser to handle these properly.

Instead, we should be dropping the where clause from HQL entirely when it is WHERE TRUE. This may require changes to code which calls the HQLPreprocessor to assemble the full HQL statement properly.

In the case of WHERE FALSE, the query should not even be executed. This will require calling code to do something smart instead, perhaps releasing the current record or something else appropriate to the runtime context.

This is a "nice to have" feature, since it already works, and this would just be an optimization of unknown benefit.

#2 Updated by Greg Shah over 7 years ago

  • Target version deleted (Code Improvements)

Also available in: Atom PDF