Link Details

Link 284883 thumbnail
User 389487 avatar

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.
  • 11
  • 0
  • 1174
  • 399

Comments

Add your comment
User 388907 avatar

MCII replied ago:

0 votes Vote down Vote up Reply

Hibernate introduces more complexity than it reduces.

User 389487 avatar

demobox replied ago:

0 votes Vote down Vote up Reply

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.
,

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (10)



Voters Against This Link (0)