[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
|