• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to map a non-primary key table in hbm file.

 
abheeshek reddy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

Is there a way to map a table in hbm file which doesn't have any relation with other tables. if yes, please share a sample program to understand.

 
abheeshek reddy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abheeshek reddy wrote:hi all,

Is there a way to map a table in hbm file which doesn't have any relation with other tables. if yes, please share a sample program to understand.

 
Satyaprakash Joshii
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Had there been relation of this table with other tables, you would have to specify that.
Since here you do not have relation to any other table create a simiple hbm...speifying only the properties ,primary key.....and not speifying any one to one,one to many,many to many mapping....
 
Rajit vreddi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without relationship you can not map to any hbm.Mappings are possible for only those having relationship with others.
 
Satyaprakash Joshii
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell clearly what you are trying to do using hibernate?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic