I am trying to call the CONTAINS function of the oracle database through the criteriabuilder.function() method. The code looks like:
criteriabuilder.function("CONTAINS", Integer.class, criteriabuilder.literal("ADDRESS"), criteriabuilder.literal("text-to-search"), ...)
The log shows that "binding parameter [1] as [VARCHAR] - ADDRESS". While the syntax of the CONTAINS function shows that the first parameter of the CONTAINS function is a column name whose type is not VARCHAR.
CONTAINS( [schema.]column, text_query VARCHAR2 [,label NUMBER]) RETURN NUMBER;
This inconsistency causes the code to fail. So the question is how to pass the column name so that it is recognizable by the database. Thanks!
|