|
|
Re: Using CLOBs in entities with Oracle [message #703539 is a reply to message #703484] |
Wed, 27 July 2011 17:12 |
Brendan Haverlock Messages: 46 Registered: July 2009 |
Member |
|
|
This is the query that is being generated:
SELECT * FROM (SELECT /*+ FIRST_ROWS */ a.*, ROWNUM rnum FROM (SELECT t0.clob AS clob FROM code t0,
org t1 WHERE ((((((((UPPER(t0.x) = 'CJO0UUCO7G') AND (UPPER(t0.y) = 'FEODUQUUJH')) AND (t0.clob = '9BSMsjkuGA')) AND (UPPER(t0.a) = 'ZMP4ADKINK')) AND (UPPER(t0.b) = 'KOAFL4SNDN'))
AND (t0.c = 7)) AND (t1.d = 1021)) AND (t1.e = t0.e))) a WHERE ROWNUM <= 100) WHERE rnum > 0;
[Updated on: Wed, 27 July 2011 17:13] Report message to a moderator
|
|
|
|
|
|
|
|
Re: (no subject) [message #704546 is a reply to message #703564] |
Thu, 28 July 2011 19:22 |
Chris Delahunt Messages: 1389 Registered: July 2009 |
Senior Member |
|
|
I do not believe Oracle allows using = on clobs. You will need to try something else, such as converting the clob in the database to a string, using EclipseLink's JPQL FUNC to use the database TO_CHAR function.
Something like
"select entity.clobField from Entity entity where (FUNC('TO_CHAR', entity.clobField) = '9BSMsjkuGA') and ... "
Best Regards,
Chris
[Updated on: Thu, 28 July 2011 19:24] Report message to a moderator
|
|
|
(no subject) [message #704553 is a reply to message #703539] |
Thu, 28 July 2011 19:22 |
Chris Delahunt Messages: 1389 Registered: July 2009 |
Senior Member |
|
|
I do not believe Oracle allows using = on clobs. You will need to try something else, such as converting the clob in the database to a string, using EclipseLink's JPQL FUNC to use the database TO_CHAR function.
Something like
"select entity.clobField from Entity entity where (FUNC(TO_CHAR, entity.clobField) = '9BSMsjkuGA') and ... "
Or use the LIKE operator instead of equals:
"select entity.clobField from Entity entity where (entity.clobField LIKE '9BSMsjkuGA') and ... "
Best Regards,
Chris
[Updated on: Thu, 28 July 2011 19:29] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02468 seconds