Hibernate version:2.0
Name and version of the database you are using:oracle9.2
hi,
how to use the sql intersect clause in Criteria and Expression
the requirement is we have a table of case_status which contains values like open,reopen,closed. and we have another table called case where every case can have one or more statuses.
there is a one-to-many mapping in the case table to the status table.
we want to retreive all records in the case table which have status1 and status2
where status1 and status2 are the criteria.
eq: we want to retreive all the cases which have both 'open' and 'reopen' status . how do we achiev this using Expression
Similarly we want to retreive all cases which has 'open' status and doesnot have 'closed' status.
thanks in advance for ur help
|