Hibernate version: 2.1.6
Hello, I have the following query that runs fine in MySQL,
but I cannot run it in hibernate. Anyone can give me hints on how to write the HQL equivelent wins a cookie! :)
query "find all phone#s NOT in internal or external do not call list"
see sql code below...
Structure,
I have 3 independent tables:
tables:
Vendor
do_not_call_client
internal_do_not_call_client
Classes:
I have 3 corresponding classes, no inhertance or anything...
i haven't defined any relationships amongst them.
here is the sql:
Code:
select v.*
from vendor as v
left join do_not_call_client as dcl on v.phonenumber=dcl.phonenumber
left join internal_do_not_call_client as idcl on v.phonenumber=idcl.phonenumber
where dcl.phonenumber is null and idcl.phonenumber is null ;