Can Hibernate automatically uppercase a column on read/insert via configuration?

Posted by T Reddy on Stack Overflow See other posts from Stack Overflow or by T Reddy
Published on 2010-03-08T19:57:47Z Indexed on 2010/03/09 2:51 UTC
Read the original article Hit count: 409

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about hibernate