• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Usertype with multiple columns within an embedded component

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic