Use the eclipselink.target-database
property to specify the database to use, controlling custom operations and SQL generation for the specified database.
Values
Table 5-89 describes this persistence property's values.
Table 5-89 Valid Values for target-database
Value | Description |
---|---|
Defined in the |
Specify your database:
|
Usage
If eclipselink.validation-only
= true
, you must cannot use an Auto
class name or short name.
Examples
Example 5-93 shows how to use this property in the persistence.xml
file.
Example 5-93 Using target-database in persistence.xml
<property name="eclipselink.target-database" value="Oracle"/>
or
<property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.HSQLPlatform"/>
Example 5-94 shows how to use this property in the persistence.xml
file.
Example 5-94 Using target-database in a Property Map
import org.eclipse.persistence.config.TargetDatabase; import org.eclipse.persistence.config.PersistenceUnitProperties; propertiesMap.put(PersistenceUnitProperties.TARGET_DATABASE, TargetDatabase.Oracle);
See Also
For more information, see: