• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help hibernate criterial

 
Auttapol Pipatpatama
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SQL(2 tables a and b)
where b.xxx = 'xxx'
and (a.yyy = 'yyy' or b.zzz = 'zzz')

how to use criteria to map this SQL

criteria1 = hbSession.createCriteria(B.class); <-- table a
criteria2 = criteria1.createCriteria("relation"); <-- table b
.
.
.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!