2

Let's say i have an entity like this. What the difference between field a and b?

public class Human implements Serializable{
   public transient String a;

   @Transient
   public String b;

}
Vytsalo
  • 670
  • 3
  • 9
  • 19
  • Does this answer your question? [Why does JPA have a @Transient annotation?](https://stackoverflow.com/questions/2154622/why-does-jpa-have-a-transient-annotation) – Joachim Sauer Jan 28 '20 at 09:24

1 Answers1

3

transient is about not serializing the field when @Transient is about not persisting the field

Mister Mow
  • 31
  • 3