My setup is Spring JPA / Hibernate / Oracle.
There's a trigger in the DB that performs some basic operation on multiple fields in a row (e.g. perform rounding on a decimal saved as string).
Naturally, when I save said row from the ORM, it doesn't pick up the changes made by the trigger, unless I do an em.refresh(myRow).
Since I am using interfaces extending JpaRepository, I can only do that wherever the repos are being used (or implement this particular repository and override the save methods).
There is also a @Generated annotation from Hibernate which might work, although it's more like a hack, since that's not what it was made for.
Can it be done in any other way?