BZ1032192 - AlertCondition composite queries, query each column

Hibernate would return an empty entity and consequently lead to N+1 selects.

The code is ugly, unfortunately.

Adding tests for these queries
BZ1032192 - AlertCondition intentional API changes

Adding intentional API changes as well
Merge pull request #65 from genman/BZ1032192

BZ1032192 - AlertCondition composite queries, query each column