0

I have following SQL query. How to map this to hibernate query ? '(' seems causing issue. Is this possible with Criteria Query ?

   select id from 
    (select prev.id from my_table prev where date = :prevDate) P
    LEFT OUTER JOIN 
    (select curr.id from my_table curr where date = :currDate) C
    ON P.id = C.id
    where C.id is null
Jigar Shah
  • 2,576
  • 6
  • 31
  • 53
  • these links might help, http://viralpatel.net/blogs/hibernate-self-join-annotations-one-to-many-mapping/ and http://stackoverflow.com/questions/31668522/hibernate-self-join-confusion – Jay T. Feb 23 '16 at 21:58
  • Viral's blog talks about relations in entity where we are actually have kind of self join. – Jigar Shah Feb 24 '16 at 09:57

0 Answers0