-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: How to do a simple "search"-function with wildcard
PostPosted: Sat Jun 04, 2005 1:24 pm 
Newbie

Joined: Sat Jun 04, 2005 1:15 pm
Posts: 5
Hi everybody,

till now I have gained a lot of experience using hibernate. Nevertheless I'm struggling with a very simple problem: how can I realize a very simple and 'tolerant' search-function with hibernate?

I have a couple of "text-components" and I want to create a jsp-page on which the can enter something like "search: 123* " but how can I do this?

Till now I just know the "SELECT comp FROM Textcomponent as comp WHERE text='123*'"-query but this will return no results because it will interpret the * as a character and not as a wildcard.

So how can I realize such a search-function? What is the correct SELECT-query???


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 04, 2005 1:27 pm 
Newbie

Joined: Sat Jun 04, 2005 1:15 pm
Posts: 5
I'm sorry for posting this message twice, my Konqueror-Browser has a very buggy "shortcut-button"-feature which sometimes is hard to controll...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 04, 2005 3:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
like


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 04, 2005 5:08 pm 
Newbie

Joined: Sat Jun 04, 2005 1:15 pm
Posts: 5
thank you, that was exactly the one and only keyword I was looking for, now I can solve this problem ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.