-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate and Regex
PostPosted: Mon Jul 04, 2005 9:55 am 
Newbie

Joined: Mon Jul 04, 2005 9:51 am
Posts: 2
Hi,

I am trying to execute an sql statement with a regular expression in the where clause. Is there a way, to use regex with hibernate ?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 04, 2005 9:57 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Did you try?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 04, 2005 10:24 am 
Newbie

Joined: Mon Jul 04, 2005 9:51 am
Posts: 2
Well I have a sql statement type "mySql", for example :
SELECT * FROM sam_term WHERE name REGEXP '1$'

I know the application should work with at least SQLServer and MySql...
but I cannot use 'regexp' the same way with SQLServer, I have to change the sql statement with using 'like'.

So I was wondering if there would be a way to use a very generic sql statement independant of the database and then use maybe a hibernate special binding to reflect my regular expression search...

Thanks again.


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