Hibernate - How to turn off column display

When tagged as @Entity, each class attribute maps to a single database column. I have several classes where I want to add some fields for internal use, but I do not want hibernate to map them to the database column. Is there any way to do this?

thank

+5
source share
1 answer

You either mark it with variables using @ javax.persistence.Transient, or declare it temporary.

@javax.persistence.Transient
String myTransietnColumn;



transient String myAnotherTransientColumn;
+12
source

All Articles