• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Query

 
shailesh kumar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ALL,

I am using Hibernate 3.0 and I have to select all the product names and sort by upper case or lower case:
Example: product names: test1,test123,test2314, TEST Product,test

When I do order by it should display as:
test
TEST Product
test1
test123
test2314

Any suggestions appreciated ...
 
John Mikhail
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stopping short of writing the code for you, check out the HQL functionality within hibernate. You can easily use the Criteria interface to build the kind of query you're looking for.

http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Criteria.html
 
tikku don
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic