Amnon,
The possible values for the "access" attribute are:
property: it means that hibernate accesses the value of the class member by using the class getXXX method of that property. It is the most common and logical way to access an object's property value.
field: Hibernate can do weird stuff using the introspection API, and that allows it to access the property value directly from the field, without going through the getXXX method
in the following class:
Code:
Class A{
String example;
public String getExample(){
if (example==null)
return null;
else
return example.toUpperCase();
}
}
if you set the access="property", it return the member variable in uppercase or a null. If you set access="field", it will return the exact content of the example property.
The same goes for the "seXXX" methods.
There is a third possible setting for access: "
ClassName". This is used when the class you define is not a normal Java Bean, but a map with configurable properties. Don't worry about this one.