Archive for the 'Hibernate' Category

Storing Files as URLs with Hibernate UserType

Wednesday, March 25th, 2009 by Luis

Storing Files in databases as a BLOB always seemed inherently daft to me. I wanted to be able to store user generated Files as URLs in the database, and let an HTTP Server serve them, so why is Hibernate storing BLOBs? Hibernates UserType allows conversion between ungainly classes such as java.net.URL or java.io.File and the somewhat pale and pasty datatypes of the database world.

Read the rest of this entry »