Description of problem: When I run the following search, availability=down (plugin=platform | plugin=RHQAGENT | plugin=Apache) it returns UP resources. The generated JPQL is, SELECT resource FROM Resource resource WHERE ( resource.inventoryStatus = :inventoryStatus ) AND ( ( ( resource.currentAvailability.availabilityType = 0 ) AND ( LOWER(resource.name) LIKE '%(plugin=platform%' ) ) OR ( LOWER(resource.resourceType.plugin) LIKE '%rhqagent%' ) OR ( LOWER(resource.resourceType.plugin) LIKE '%apache%' ) ) Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: