Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Question on SQL with literals


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

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 itsmeden@xxxxxxxxx, and destroy all copies of this
message and any attachments.

Back to the top