What does @Transient annotation mean for methods?

后端 未结 2 1297
予麋鹿
予麋鹿 2021-02-20 00:56

So I have learned that the transient keyword in Java means that an entity does not persist, and that the @Transient annotation in JPA means don\'t pers

2条回答
  •  没有蜡笔的小新
    2021-02-20 01:26

    Well it's a proper getter method, which JPA by default will assume is bound to an entity property. If you don't want JPA to treat a getter as a property, you apply the @Transient annotation to the method.

提交回复
热议问题