I'm attempting to use the following named query:
Code:
@NamedQuery(name="entryList.forSearch", query="from Entry e where regexp_like(e.term, :regex, 'i')")
I've tried all three versions commented out below for the constructor of my own dialect but receive the same exception for all 3.
Code:
public class NewOracle10gDialect extends org.hibernate.dialect.Oracle10gDialect {
public NewOracle10gDialect() {
super();
// registerFunction("regexp_like", new VarArgsSQLFunction(new BooleanType(), "REGEXP_LIKE", ",", ")"));
// registerFunction("regexp_like", new StandardSQLFunction("REGEXP_LIKE", new BooleanType()));
// registerFunction("regexp_like", new SQLFunctionTemplate(new BooleanType(),"REGEXP_LIKE(?1, ?2, ?3)"));
}
}
The Exception I get is:
Code:
org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: ( near line 1, column 60 [from com.gem.entity.Entry e where regexp_like(e.term, :regex, 'i')]
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
Is there a reason why this wasn't implemented for Oracle already?
And has anyone had any luck getting this working?
Thanks in advance!