• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help hibernate criterial  RSS feed

 
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
.
.
.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!