JPA中,field-based和property-based有什么区别啊?JPA中,field-based和property-based有什么区别?请详细点!顺便请说说这些是什么意思:If the entity has field-based access, the persistence provider runtime accesses instance vari
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 07:02:10
JPA中,field-based和property-based有什么区别啊?JPA中,field-based和property-based有什么区别?请详细点!顺便请说说这些是什么意思:If the entity has field-based access, the persistence provider runtime accesses instance vari
JPA中,field-based和property-based有什么区别啊?
JPA中,field-based和property-based有什么区别?
请详细点!
顺便请说说这些是什么意思:
If the entity has field-based access, the persistence provider runtime accesses instance variables
directly. All non-transient instance variables that are not annotated with the Transient
annotation are persistent. When field-based access is used, the object/relational mapping annotations
for the entity class annotate the instance variables.
If the entity has property-based access, the persistence provider runtime accesses persistent
state via the property accessor methods. All properties not annotated with the Transient
annotation are persistent. The property accessor methods must be public or protected. When
property-based access is used, the object/relational mapping annotations for the entity class
annotate the getter property accessors[2].
JPA中,field-based和property-based有什么区别啊?JPA中,field-based和property-based有什么区别?请详细点!顺便请说说这些是什么意思:If the entity has field-based access, the persistence provider runtime accesses instance vari
如果是数据库的话,好像没啥区别.