aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Column Transformer" Watch "Hibernate Column Transformer" New topic
Author

Hibernate Column Transformer

Desiree Rguez.
Greenhorn

Joined: Jun 08, 2005
Posts: 6
Hello,
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 nat_values.id, 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: http://aspose.com/file-tools
 
subject: Hibernate Column Transformer