Hi
I am using EclipseLink 3 preluage with my Java SE application. my code to
prepare a query is as follow:
q = em.createQuery("SELECT B FROM Branch B WHERE B.street LIKE :street");
q.setParameter("street", "'%a%'");
And the generate SQL statement as shown in the log is like:
SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST (? AS VARCHAR(32672)
))
bind => [%a%]
I think the generated SQL statement is incorrect or somehow it does not work
well with Derby, because I receive no result for my JPA QL, while if I
execute it as a simple SQL statement I get tens of rows in the restultset.
Am I missing something here? Is that generated SQL correct?
Thanks.