• 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
.
.
.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic