-->
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.  [ 5 posts ] 
Author Message
 Post subject: find method with LIKE
PostPosted: Mon Dec 15, 2003 12:26 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi all...

I

_________________
Tads


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2003 12:47 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Why do you need "where" twice ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2003 12:49 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
In this message it is wrong, but into java code, is correct:

Code:
query = "select o from Order o join o.items item
where upper(item.naUser) like upper ( % ? % )";

_________________
Tads


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2003 12:49 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
try this :
query = "select o from Order o join o.items item
where upper(item.naUser) like upper ( ? )";

Object[] obj = new Object[1]; // only example
Type[] tp = new Type[1]; // only example

obj[0] = "%" + stringNaUser + "%";
tp[0] = Hibernate.STRING

....


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2003 2:00 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Very good!!!!

thanks for your help!!!

[]

_________________
Tads


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.