[ACCEPTED]-Hibernate: Add a property in my class that is not mapped to a db-table-hibernate-annotations
Accepted answer
Use @Transient
annotation for field you are not going 1 to store in DB:
@Transient
public String getStatus() {
return status;
}
or:
@Transient
private String status;
Mark it as @Transient
, and it won't be part of the 1 DB schema.
If you annotate a field with @Transient
it will not 1 be persisted.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.