I have a web app, using EclipseLink and MySQL for storing data.
Some of these data are strings, ie varchars in the DB.
In the code of entities, the strings have attributes
I don't know anything about the EclipseLink, but in the Hibernate it's doable - you could make an org.hibernate.Interceptor and in onFlushDirty method modify the object's currentState using entity meta data.