Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieval without unique identifier from Oracle database View

 
Sethu Raman
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

Am very new to hibernate. I am using JSF and Hibernate in my code. I have one "View" in oracle database which collects the exact output from three different table. It is done this way since difficult calculations are there.

Now i want to generate hbm.xml file for that "View".I did that but am getting error since there will not be any unique identifier there. It doesn't allow me to leave <ID> tag inside <CLASS> tag.

This view can be consider as seperate table.
Since there is no unique id am getting problem in retrieving.

Note: I need only retrieval method no need of creating or modifying....


Can anyone help me in this....

Thanks in advance....

Regards.,
Sethu
 
Ketan Jambhekar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You need a unique identifier in hibernate without which you cannot retrive the values. Now since you are not creating or updating any rows you can add a new sequence in your view or use a rownum and use it as a unique identifier.

Thanks,
Ketan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic