Use eclipselink.jdbc.allow-native-sql-queries
to specify if user-defined (that is, native) SQL is allowed within a persistence unit.
Table 5-38 describes this persistence property's values.
Table 5-38 Valid Values for jdbc.allow-native-sql-queries
Value | Description |
---|---|
|
(Default) TopLink allows native SQL. |
|
TopLink does not allow native SQL. |
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 TopLink to set eclipselink.jdbc.allow-native-sql-queries as false
.
Example 5-28 Using jdbc.allow-native-sql-queries in persistence.xml
<property name="eclipselink.jdbc.allow-native-sql-queries" value="false" />
For more information, see:
"Querying" in Understanding Oracle TopLink