I have a REST API with Spring and @RestController
and an entity with a JPA repository. Is there a way to transport data (fields) via REST but not persist the corresponding data to the database?
I tried to use @Transient
for the specific field, which works for persistence but not for transport. The data will not be marshalled/unmarshalled and thus omitted during transport.
Any ideas?