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.  [ 1 post ] 
Author Message
 Post subject: queries with regular expressions on Oracle 10g via Hibernate
PostPosted: Thu Jun 02, 2005 10:29 am 
Newbie

Joined: Wed May 05, 2004 5:48 pm
Posts: 3
[b]Hibernate version: 2.0.3[/b]

[b]Name and version of the database you are using: Oracle 10g[/b]

hi, all sides,

used oracle 10g regular expression feature with hibernate as in the following:

1. negation of an REGEXP_LIKE expression:

session.find("select count(a) from a in class PersistentEntry where ( ( NOT ( REGEXP_LIKE( a.columnname, '^.*host=.*,cn=Hosts,cn=Resources$') ) ))"
)

it lead to an QueryException.

2. negation of an REGEXP_LIKE expression combined with another normal LIKE expression:

session.find("select count(a) from a in class PersistentEntry where ( ( NOT ( REGEXP_LIKE( a.columnname, '^.*host=.*,cn=Hosts,cn=Resources$') ) AND a.columnname like '%cn=Resources'))"
)

it was translated into the following SQL statement and it is wrong.

select count(a.id) as x0_0_ from ENTRY a where ((((REGEXP_LIKE(a.columnname , '^.*host=.*,cn=Hosts,cn=Resources$')))AND(a.columnname like '%cn=Resources' )))

has anybody had experiences with queries with regular expressions on Oracle 10g via Hibernate?

which version of Hibernate might handle the Oracle 10g feature correctly? the Hibernate version i am using is not that new.

is there any work-round for the described problem?

many thanx in advance!


benjamin


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

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.