JPA Transient Annotation and JSON

后端 未结 10 1430
无人共我
无人共我 2020-11-29 03:03

This is a follow up to the following question on the JPA Transient annotation Why does JPA have a @Transient annotation?

I have a transient variable that I do not wa

10条回答
  •  时光说笑
    2020-11-29 03:21

    In my case only works with this:

    @Transient
    @JsonGetter(value = "transientProperty")
    public String getSomething() {
        return something;
    }
    

    I hope this can be useful for someone. Regards.

提交回复
热议问题