Link to home
Create AccountLog in
Avatar of arkhls
arkhls

asked on

How can I do Hibernate mapping for View that does not have ID or primary key ?

I'm trying to do hibernate mapping for Views , The views that I have basically selecting data out of 3 diifferent database sand they are all SELECT statament and there is no Primary key
I 'm in trouble to make a hibernate mapping for those views beucase  I need to joint the views with tables in my database tables
Avatar of arkhls
arkhls

ASKER

I forgot to mentioned that all the views return duplicate rows , There is no  columns that has unique value
Avatar of Mick Barry
don't think you can, you'll need to add a primary key.

hibernate require unique id. unique ids are main part that differentiate different persistent objects
ASKER CERTIFIED SOLUTION
Avatar of arkhls
arkhls

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of arkhls

ASKER

.
Avatar of arkhls

ASKER

.
Avatar of arkhls

ASKER

I fixed that on my own and commented as solution for this issue