persistence.xml is a configuration file for setting standard and specific configuration properties of the persistence unit that your entities belong to.
The following table shows the SAP implementation-specific properties of JPA that can be configured in the persistence.xml :
Property |
Description |
com.sap.jpa.sql.mapping |
Setting this property, you can control the JPA calculation of the SQL statements that are sent to the database. The possible values are:
|
com.sap.jpa.identity.generator.tablename |
This property specifies the name of the table used for automatic ID generation with the TABLE strategy. For more information, see Generated Primary Keys . |
com.sap.jpa.versioning.generator.tablename |
When you are working with the system DataSource, which has a default isolation level read_uncommitted , and you are using versioned entities, you can set this property to specify a table name to be used by the version generator. For more information, see Versioning and Dirty Reads . |
com.sap.jpa.versioning.generator.allocation-size |
When you are using versioning, you can specify the allocation size of the version generator using this property. For more information, see Versioning and Dirty Reads . |
com.sap.jpa.execution.foreign-key-handling |
Setting this property, you specify the strategy to be used for handling foreign key constraints on the database. The possible value is:
For more information, see Native Databases with Foreign Key Constraints . |
com.sap.jpa.cache.read-only-classes |
Using this property, you declare read-only entities. For more information, see Caches in the JPA Implementation . The value of this property is a comma-separated list of the fully qualified class names of the entities that are read-only. |
com.sap.jpa.cache.cacheable-classes |
Using this property, you declare cacheable entities. For more information, see Caches in the JPA Implementation . The value of this property is a comma-separated list of the fully qualified class names of the entities that are cacheable. |
com.sap.jpa.cache.object-cache.size |
You use this property to change the default maximum size of the entity cache. For more information, see Caches in the JPA Implementation |
com.sap.jpa.cache.query-result-cache.size |
You use this property to change the default maximum size of the query result cache. For more information, see Caches in the JPA Implementation . |
com.sap.jpa.cache.query-result-cache.time-to-live |
When working with JPA caches, you can use this property to specify the time-to-live in seconds of a cached query. For more information, see Caches in the JPA Implementation . |
com.sap.jpa.compliance.sap-product-standard |
This property enables/disables the SAP Product Standard Compliance check. The possible values are:
Enabling this property prevents the usage of the Entity cache and the Query Result cache. For more information, see Caches in the JPA Implementation . SAP Note 1169694 |
com.sap.jpa.query.max-en-bloc-size |
Specifies the maximum number of related entities to be loaded en-bloc. If this property is not set, the default value applies ( 50 ). To switch off en-bloc loading, set this property to 1 . |
com.sap.jpa.execution.generate-proxies |
Specifying the value of this property to true enables generation of proxy classes used for lazy loading of entities. For more information, see Lazy-Loading Entities with Single-Valued Relationships . |
For information about the standard configurable properties of the persistence.xml , refer to http://java.sun.com .