ColumnTransformer in jmix entity

Hi,

I am trying to use @ColumnTransformer annotation in entity class but i am getting could not resolve issue.

Can this be used in jmix entity or any alternative

@ColumnTransformer(
            read = "pgp_sym_decrypt(CAST(? AS bytea), current_setting('encrypt.key'))",
            write = "pgp_sym_encrypt(CAST(? AS text), current_setting('encrypt.key'))"
    )

Hi Adnan,

Unfortunately, Jmix does not have an equivalent to the @ColumnTransformer annotation. If calculating the field programmatically is okay, you can use EntitySavingEvent and EntityLoadingEvent.
You can see an example here:
https://docs.jmix.io/jmix/data-access/entity-events.html#saving-loading-events

Regards,
Sergey.