Hibernate version: 3.2.1.ga
Name and version of the database you are using: Informix 10
Hi!
I've been looking for a solution in FAQs and previous posts about this problem. I will try to simplify it:
I have 2 tables, orders and invoices for example
ORDERS
order_id
order_desc
...
INVOICE
invoice_id
order_key
...
What I need to do is to get a collection of orders which has not an invoice associated, I mean something like select * from ORDERS where order_id not in (select order_key from INVOICE)
I want to avoid to use subqueries so what I´d like to do with criteria is this:
select * from ORDERS a left outer join INVOICE b on a.order_id=b.order_key and b.invoice_id is NULL
any ideas?
Thanks in advance!!
|