well, jaimes tip was perfectly all right ...
With a custom UserTypes you can do this ... i think you won't be able to find a more "general" solution which is as easy as writing some UserTypes, especially because you can find some examples of such UserTypes in the forum.
In Hibernate (as far as i know hibernate) the (User)Types are responsible for reading a value from the resultset (or setting it) and returning the value which will be set into your bean ... so it's the best place to change values, as you need it.
Sure, you have to write a UserType for each type (int, String, long etc.) but that's not really a problem ... they're nearly all the same ...
gtx
curio
|