[b]Hibernate version:[/b] 2.1
[b]Mapping documents:[/b] Hibernate in action
[b]Code between sessionFactory.openSession() and session.close():[/b]
[b]Full stack trace of any exception that occurs:[/b]
[b]Name and version of the database you are using:[/b]
[b]The generated SQL (show_sql=true):[/b]
[b]Debug level Hibernate log excerpt:[/b]
Hi ,
I am a biggner in Hibernate. I want to write a HQL query using sub queries.
I through the "Hibernate in Action" book but could not find a suitable answer for my
problem.
My select query looks like this
[code]Select u.* from users u
where u.manager_Id = 1
and u.id not in (Select User_id from OBJECTIVES where
assigned_Obj_Id in (1,2,3)) [/code]
I have a many-to-one mapping from Objectives to User in objectives.hbm but not the other
way round
can any body tell me the appropriate HQL Query
Thanks in Advance
[b]Vinay[/b]
|