Should @Transient property be used in equals/hashCode/toString?

后端 未结 3 1898
眼角桃花
眼角桃花 2021-02-06 03:08

I have JPA entities where some properties are annotated with @Transient.

Should I use these properties in equals/hashCode/toString methods?

3条回答
  •  悲&欢浪女
    2021-02-06 03:58

    Exception maybe comes from letting it be transient and at the same time you provide writeObject() and readObject() where you process it.

提交回复
热议问题