• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create mapping for a Key-Value kinda Table ?

 
prasad kulkarni
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Hibernate with version:3.2.6 .

I have a database table EMP_TABLE like :
EMP_ID | KEY | VALUE
100 | EMP_NAME | John Scott
100 | CITY | NEW YORK
100 | COUNTRY | USA
240 | EMP_NAME | Shane Watt
240 | COUNTRY | CAN
300 | COUNTRY | USA

How should I write hibernate mappings for this table so that I can get the employee details & also save/update it, using following class ?


Mapping :

Any kind of clue, help is appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic