• Post Reply Bookmark Topic Watch Topic
  • New Topic

HIBERNATE  RSS feed

 
baskara lingam.k
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a database view based on 3 tables.I can't have a primary key for a view. I have created a mapping file and persistent class. When I select rows from database view through HQL,I am getting only first record repeated n(i.e total no of row) times.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the ORM Forum.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this happens as Hibernate doesn't know how to differentiate the tuples. I guess you should define a composite key to solve this. (composed for example from the 3 ids of the tables)

./pope
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!