File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes SQL to HSQL - DetachedCriteria Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "SQL to HSQL - DetachedCriteria" Watch "SQL to HSQL - DetachedCriteria" New topic

SQL to HSQL - DetachedCriteria

s daniel

Joined: Nov 03, 2008
Posts: 9
I'm trying to convert this SQL statement into HSQL
(I tired following a few other threads but it didn't work.)

This is what I tired but didn't work

I get this error for Line A: The method in(String, Object[]) in the type Restrictions is not applicable for the arguments (String, int[])

I get this error for Line B: The method in(String, int[]) is undefined for the type Expression
Kuladip Yadav
Ranch Hand

Joined: Jul 30, 2008
Posts: 162

Hi s daniel ,

I think, while programming you are not checking api.

Following are signature of method in

You have to use array of Object.

So you can use :

That will solve the problem.
Same is the case for Expression

For more information Check this


- Kuldeep
s daniel

Joined: Nov 03, 2008
Posts: 9
Hey Thanks it worked!!

I converted my array into the one you suggested and it worked.

int[] productIds = {10011, 10012, 10013, 10014};
Integer[] productIds = {10011, 10012, 10013, 10014};
I agree. Here's the link:
subject: SQL to HSQL - DetachedCriteria
It's not a secret anymore!