By demobox
via blog.xebia.com
Published: Nov 09 2009 / 19:22
In the careers of most Spring/Hibernate developers I know, there sooner or later comes a point of no escape...they have to write a Hibernate user type. The first one is usually of the copy'n'paste variety, and by and large works perfectly well. Until it doesn't.
In this post, we'll be dissecting the Hibernate UserType interface, explaining the relationships between the various methods, and developing a set of base user types that capture common use cases.





Comments
MCII replied ago:
Hibernate introduces more complexity than it reduces.
demobox replied ago:
Agreed ;-) I try to stay away from Hibernate (and JPA in general) as much as possible - for plain persistence of domain objects a blob or key/value store usually works well, and if I need to do searching the DB structure that results from squeezing my domain objects in there isn't optimal anyway.
,
Voters For This Link (11)
Voters Against This Link (0)