-->
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: Hibernate3 - mysql - REGEXP error
PostPosted: Mon Mar 14, 2005 2:04 pm 
Newbie

Joined: Mon Mar 14, 2005 1:09 pm
Posts: 2
I'm having a problem getting regexp to work in a HQL - can someone help me with this? Also note the spring framework hibernate3 patch
----------

ver: Hibernate3

stack -->
org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: regexp near line 1, column 78
[from com.xxx.bean.Product product where lower(product.displayName) regexp '[0-9]']; nested exception is org.hibernate.hql.ast.QuerySyntaxError:
unexpected token: regexp near line 1, column 78 [from com.xxx.bean.Product product where lower(product.displayName) regexp '[0-9]']
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:558)

HQL
----
Product product where lower(product.displayName) regexp '[0-9]']


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 2:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well, you basically can't use vendor-specific functions in HQL if they are not in a "function form" like function(arg1,...,argN)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 10:11 pm 
Newbie

Joined: Mon Mar 14, 2005 1:09 pm
Posts: 2
I thought WhereParser.java had this attrib (regexp) added to it. If this is the case should not it wotk just as "like" or such would?

Thx
A


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.