This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes oracle database view+entity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "oracle database view+entity" Watch "oracle database view+entity" New topic

oracle database view+entity

Gihan Pandigamage
Ranch Hand

Joined: Aug 23, 2009
Posts: 60
hi guys ,
I have a problem.I tried to create a view by using 4 database's nicely created but I'm going to create a entity by using that database 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

Joined: Apr 14, 2004
Posts: 10336

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.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Gihan Pandigamage
Ranch Hand

Joined: Aug 23, 2009
Posts: 60
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...

[Thumbnail for 123.JPG]

I agree. Here's the link:
subject: oracle database view+entity
It's not a secret anymore!