Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Usertype with multiple columns within an embedded component

 
Victor Dolirio
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,

I'm in a situation where I needed to create an UserType that have 2 columns. So far so good. Every entity needs to map this type with a @Columns specifying column names.
But one of my entities have an embedded component which, in turn, have 2 fields of this type.
The intuitive solution is to map the entity with @AttributeOverrides with the columns specifications on the component field. This solution doesn't work for me. I've searched for this problem and haven't found nobody with this kind of trouble. I'm using hibernate 3.6.9.

Another solution I know that would resolve this is to retire the UserType kind of mapping and pass to use @Embbedable. But this solution will require more changes.

Does someone know a solution to this?

[]s,
Victor Dolirio
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic