This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Hibernate with Integers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Hibernate with Integers" Watch "Hibernate with Integers" New topic
Author

Hibernate with Integers

Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
I am trying to retrieve a set of IDs from Orders table which are all Integers

I want to use this SQL 'like' query
==> Select * from Orders where id like "%67%";

in Hibernate
==>Expression.like(Property, value);

But this does not work, it gives me ClassCastException:

Please can i get help?

Thank You
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You should probably ask this in the ORM forum.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hibernate with Integers
 
Similar Threads
Hibernate: native query to wrap the collection
How to send comands to anoyther program
Actions (struts) dynamic path forwarding
Hibernate: unexpected queries in parent/child relationship
parsing CDATA error