It's not a secret anymore!
The moose likes Object Relational Mapping and the fly likes  hibernate withCriteria Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark " hibernate withCriteria" Watch " hibernate withCriteria" New topic

hibernate withCriteria

Pepe Papa

Joined: Jul 26, 2007
Posts: 3
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

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: hibernate withCriteria
It's not a secret anymore!