• Post Reply Bookmark Topic Watch Topic
  • New Topic

hibernate withCriteria  RSS feed

 
Pepe Papa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to make querys with hibernate and Criteria. It's getting difficult for me to create the equivalent of this query with criteria:

select * from providers as p, providers_category as pr
where p.IdProvider=pr.IdProvider
and pr.IdCategory = 1

providers_category is a many to many entity with IdProvider and IdCategory

if someone could help me i'll appreciate it

Thanks!
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"pepepapa82",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!