We have some columns with data that must always be in uppercase to ensure uniqueness. I was wondering if hibernate can force all such columns to uppercase via some configuration file change?
We actually use a custom UserType for encrypting/decrypting column data for some other table, but I figured that would be overkill just to uppercase everything...
Alternatively, I was thinking about modifying the models such that all getters/setters will uppercase any string coming and going.
The worst(?) case scenario is to modify the Oracle column constraint to ignore case while checking uniqueness.
Any thoughts?
Much cleaner approach:
@Column(name = "DUMMY")
@ColumnTransformer(read = "UPPER(DUMMY)")
private String dummy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With