File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

oracle database view+entity

 
Gihan Pandigamage
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys ,
I have a problem.I tried to create a view by using 4 database tables.it's nicely created but I'm going to create a entity by using that database view.in the entity class " There is no ID defined for this entity hierarchy" error is appeared.
how can I fix this error.
is there any way to add a unique key field to a database view.
I'm using oracle database and oracle top link

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All entities need primary keys. You can add a primary key to a view easily enough. If you are managing this entity your view will need to be an updatable view, otherwise you might find it easier to use a query.
 
Gihan Pandigamage
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks pal
I created a view and also add a primary key to the entity class.
but now I have a issue with loading data to my jsp page.
I derive a list by using that view.when I'm going to load data to my jsp page the data doesn't appear in the jsp page.
below is my jsp code snippet.

/////////////////////////////////////////////////////







searchClientList is my list name

the result page look like below...


123.JPG
[Thumbnail for 123.JPG]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic