3.3.1.52. openjpa.OptimizeIdCopy
Property name: openjpa.OptimizeIdCopy
Configuration API: org.apache.openjpa.conf.OpenJPAConfiguration.getOptimizeIdCopy
Resource adaptor config-property: OptimizeIdCopy
Default: false
Description: Attempt to optimize id class copy operations used internally by the provider during various ORM operations. This optimization is only applicable for entities using simple id classes (via @IdClass or XML equivalent) that do not have public setters, provide a public constructor with exact matching parameter types, and perform direct assignments to id class fields within the constructor. If these conditions are met, OpenJPA will use a public constructor during internal id copy operations instead of less optimal reflection. Optimization of id copy occurs during the enhancement phase. If the enhancer determines optimization cannot occur, it will fallback to the normal behavior. A side effect of enabling this property is that an id class constructor will be called by the provider during runtime operations. If there is logic in the constructor in addition to field initialization, (parameter verification, for example) that logic will also be executed during the operation, which could result in a change in runtime behavior.