I have a spring roo web service that I am currently building out but I have an entity that contains a field that should not be included in the database.
I would like the field to be in the entity and print it out with JSON to string methods, but I don’t need that value saved. Is there any annotation or hack to make this happen?
Spring Roo uses JPA for persistence. You want to mark the field as @Transient:
You can also use the same annotation for bean methods that would otherwise be mapped: