File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate One to One Associate with Composite Key having different Column Names 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 One to One Associate with Composite Key having different Column Names" Watch "Hibernate One to One Associate with Composite Key having different Column Names" New topic
Author

Hibernate One to One Associate with Composite Key having different Column Names

Naresh Kavala
Greenhorn

Joined: Jun 07, 2008
Posts: 23
Dear Ranchers,

I have two tables with composite id having one to one relationship.

Table One : PK Columns : column1, column2
Table Two : PK Columns : column3, column4.

Columns are having different names. I have to map column1 – column3 and column2-column4.
How to give one to one association in xml configuration. Could you post any guidance links.

Regards,
Naresh.
Naresh Kavala
Greenhorn

Joined: Jun 07, 2008
Posts: 23
Any ideas or suggestions please??
 
 
subject: Hibernate One to One Associate with Composite Key having different Column Names