I am currently migrating a project which uses MySQL 4 to using Hibernate with annotations. A number of tables make use of certain mysql functions such as INET_ATON()/INET_NOTA, UUID(), MD5(). How can one make use of these when performing an initial insert, and with INET_NOTA when performing subsequent selects? Is it possible to hint at the sql to be used or must I perform these in Java?
If I had to do this in Java I had planned to create types such as Password, which would in turn I would create a custom UserType for. Is this a reasonable solution?
Thanks,
Martin.
|