|
Project
|
IntelliJ IDEA
|
|
Priority
|
Normal |
|
Type
|
Bug |
|
Fix versions
|
No Fix versions |
|
State
|
Fixed |
|
Assignee
|
Gregory Shrago |
|
Subsystem
|
Editor. Error Highlighting |
|
Affected versions
|
No Affected versions |
|
Fixed in build
|
108.65 |
Query q = getSession().createQuery("select sum(f.value) " +
"from Foo f, Bar b " +
"where f.bar.id = :barId " +
(excludeEndDate ?
"and f.effectiveDate <= b.dataDate and (f.inactiveDate > b.dataDate or f.inactiveDate is null) "
: "and f.effectiveDate < b.dataDate and (f.inactiveDate >= b.dataDate or f.inactiveDate is null) ") +
"and f.value is not null");
String s = (excludeEndDate ?
"and f.effectiveDate <= b.dataDate and (f.inactiveDate > b.dataDate or f.inactiveDate is null) "
: "and f.effectiveDate < b.dataDate and (f.inactiveDate >= b.dataDate or f.inactiveDate is null) ");
Query q = getSession().createQuery("select sum(f.value) " +
"from Foo f, Bar b " +
"where f.bar.id = :barId " +
s +
"and f.value is not null");