Use eclipselink.jdbc.allow-native-sql-queries
to specify if user-defined (that is, native) SQL is allowed within a persistence unit.
Values
Table 5-38 describes this persistence property's values.
Table 5-38 Valid Values for jdbc.allow-native-sql-queries
Value | Description |
---|---|
|
(Default) EclipseLink allows native SQL. |
|
EclipseLink does not allow native SQL. |
Usage
Within a multitenant, use this option to minimize the potential impact of revealing multitenant information. By default, any persistence unit with a multitenant entity causes EclipseLink to set eclipselink.jdbc.allow-native-sql-queries as false
.
Examples
Example 5-28 Using jdbc.allow-native-sql-queries in persistence.xml
<property name="eclipselink.jdbc.allow-native-sql-queries" value="false" />
See Also
For more information, see:
"Querying" in Understanding EclipseLink