Skip Headers

# Configuring Mapped Field Access at the Project Level

Previous

Next

By default, when TopLink performs a persistence operation, it accesses the persistent attributes of an object directly: this is known as direct field access. Alternatively, you can configure TopLink to access persistent attributes using accessor methods of the object: this is known as method access.

Oracle recommends using field access for mappings. Not only is it more efficient, but using method access may cause issues if the method produces unexpected side-effects.

Table: Project Support for Mapped Field Access summarizes which projects support mapped field access configuration.

Project Support for Mapped Field Access

Descriptor | Using TopLink Workbench | Using Java
--- | --- | ---
Relational Projects |  |
EIS Projects |  |
XML Projects |  |

This section describes configuring mapped field access at the project level: by default, this configuration applies to all descriptors and their mappings.

Note: If you change the access default, existing mappings retain their current access settings, but new mappings will be created with the new default.

You can also configure mapped field access at the mapping level to override this project-level configuration on a mapping-by-mapping basis. For more information, see "Configuring Method Accessing".