This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hbm files generated for One to One Mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hbm files generated for One to One Mapping " Watch "Hbm files generated for One to One Mapping " New topic

Hbm files generated for One to One Mapping

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234


I am trying to do establish a One to One Mapping between These two Tables Car and Registrion .

So i added a Unique Constriant on to the foreign Key .

But When i generated hbm files for these two tables it still has a Many to One mapping .

Tables :

create table Car (
CarName Varchar2(20) primary key,
CarModel Varchar2(20)

create table Registration (
RegNumber Varchar2(20) primary key,
CarName Varchar2(20) unique,


HBM Files :
Registration.xml :

Please tell me where i am doing wrong .

Save India From Corruption - Anna Hazare.
xsunil kumar
Ranch Hand

Joined: Dec 14, 2009
Posts: 136
Please look in below link, you will get useful information
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Hbm files generated for One to One Mapping
jQuery in Action, 3rd edition