Question on SQL with literals

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Question on SQL with literals

Lars-Fredrik Smedberg
Hi

I was wondering if there is a way to force Eclipselink to use prepared statements instead of statements?
We have cases where:

- We use the entity manager to create a named query and it results in a statement
- We use the entity managers find method and it results in a prepared statement

When the generated SQL contains literals it generates to much log records for us and slows things down.

If the named query contains sub selects and/or not exists we seem to end up with a statement instead of a prepared statement.

For open jpa I found a property called openjpa.hint.useliteralinsql that sounds right for me, is there something similar in Eclipselink or any other way to avoid literals in the SQL / use prepared statements?

Can anyone shed some light on this so that I understand what to do to ensure it always results in prepared statements? Any configuration to "force" this?

Hope for some help on this
Best regards
Lars-Fredrik Smedberg

--
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at [hidden email], and destroy all copies of this
message and any attachments.

_______________________________________________
eclipselink-users mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/eclipselink-users