File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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?

I agree. Here's the link:
subject: Hibernate Column Transformer