Considering this piece of HQL:
Code:
select resource FROM Resource resource WHERE title like '%near%' or keywords[0] like '%near%'
My mapping looks like this.
Code:
@CollectionOfElements(targetElement = String.class)
@IndexColumn(name = "keywordIndex")
String[] keywords;
The where clause does contain 2 OR statements.
(1) When I include the second OR statement, the result list contains 0 elements.
(2)When I
leave the second OR statement, the result list contains 1 elements.
From a boolean algebra point of view, the OR statement does not work correctly. In both situations, (1) and (2), the result list should contain 1 element.
Am I right that this is an HQL implementation bug, or am I missing something?