hibernate AccessType

hibernate的AccessType表示hibernate怎样访问域对象中的属性值。

取值有:field ¦property ¦ClassName" 
field:即绕过get/set方法,直接使用反射访问字段属性;getter和setter的话,就可以不用写了。 这时,可以设置属性为不可变,可以不用执行脏检查。
默认使用property:即使用get/set 方法访问属性;这种方式可以在getter和setter中做额外的处理。
ClassName:是指使用实现了org.hibernate.property.PropertyAccessor接口的类的具体策略来访问字段属性

你可能感兴趣的:(Hibernate)