Reputation: 28304
I have an entity in JPA. I recently added a field to my entity. I do not want this field to be persisted. However, Eclipselink is complaining about it not being in the table (which it obviously isnt).
How can I exclude this class from be looked at by JPA. Please note that this field cannot be transient.
Upvotes: 2
Views: 1392
Reputation: 3626
One option is adding @Transient annotation if on the other hand you use transient keyword that means the field won't be serialized. More on Why does JPA have a @Transient annotation?
Upvotes: 0
Reputation: 1773
You can add JPA's @Transient.
Field annotated with Transient
will not be persisted.
Upvotes: 3