Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate and MySQL Views

 
Pandian Ramaiah
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have a view that contains the following data.




I want to map this to Hibernate entity. The first column 'Team_id' is not unique. Hence how can I write the mapping entries for this?
Any idea?

Thanks in advance
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that you could use a composed key Tutorial JPA Composite Primary-Key

I never mapped a view, I do not know if this will work for you.
 
Pandian Ramaiah
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Hebert,
But I have not used a composite primary key here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic