I have an abstract class Event with 2 subclasses AlarmEvent and ManageEvent.
AlarmEvent has a boolean acknowledged
ManageEvent has a boolean confirmed
I would like to query
for Event
where AlarmEvent.acknowledged (true|false)
(or|and)
ManageEvent.confirmed (true|false)
But using a simple case my queries don't provide results that match the database.
So, obviously I am missing something in how to set up the query.
Here is one sample query:
select event from Event event, AlarmEvent alarm, ManageEvent manage
where alarm.acknowledged = false or manage.confirmed = false
However, with a DB having 2 entries:
Alarm acknowledged true and
Manage confirmed false
the result set included both events
Any hints on how to make this kind of query using HSQ?
|