Reputation: 202
We have DB with duplicate rows(with duplicate primary key) and we need to handle it in hibernate , is there a way that in HBM itself this can be handled, may be using distinct or some other way, we also have lots of joins on those table.
Thank you
Upvotes: 0
Views: 496
Reputation: 797
Hibernate requires that entity table have primary key which should be unique. Try to change your table schema by adding unique column and make this column your new primary key.
Upvotes: 0