Hi,
some more detailed questions on custom functions. I found that:
http://openjpa.apache.org/builds/latest/docs/javadoc/org/apache/openjpa/jdbc/kernel/exps/JDBCWildcardMatch.html
The example in this javadoc is this line of JPAQL:
"address.street.ext:wildcardMatch (\"?ain*reet\")"
I dont bother about wildcardMatch itself but i am wondering if this
".ext:" notation is somewhere defined. I crawled the JPA specs and
found no reference to it. So is there a custom OpenJPA-JPAQL parser or
something? In fact i can see no reference to custom functions in JPA
at all. This makes me mad. Really wild guessing here.
At this point i have my custom function (aka FilterListener) installed
via persistence.xml like this:
<property name=" openjpa.jdbc.JDBCListeners "
value="de.logentis.openjpa.LevenshteinDistanceMatch"/>
Can i go on with something like this in my JPAQL ? :
Query query = em.createQuery("select p from Person p where
p.name.ext:levenshteinMatch(?1, 8))");
Of course my Filter accepts two arguments and returns the name of the
written function via getTag().
Thanks for infos and when i through all this, i would love to
contribute some examples in the examples folder of the distro!
Marc