This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate Column Transformer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Column Transformer" Watch "Hibernate Column Transformer" New topic

Hibernate Column Transformer

Desiree Rguez.

Joined: Jun 08, 2005
Posts: 6
I have the following two DB tables:

and the correspondent beans:

One object of nat_values can be related to many objects in area.
The field id in both tables is a number, but the field Area.id_nat_values, which relates an Area to one object of Nat_values is not, it is a coded string which can be obtained by calling the function DECODE(Area.id_nat_values).
I use a column transformer to achieve this, which works fine in a many-to-one mapping that I have for some other objects, but it is nt working in this.
This are my mapping files:

When I try to select the elements from nat_values Hibernate doesn't use the column transformers in the select, so it doesn't work and I can not get the list of areas.
any idea why is this happening?

Don't get me started about those stupid light bulbs.
subject: Hibernate Column Transformer
Similar Threads
Hibernate generating queries with duplicate columns
Auto Generator in composite key
Optimisation problem
Help with mapping set - Hibernate
Not-null property references a null or transient value