java Oracle db eclipse TopLink RelationalDescriptor without primary key: is it possible?

91 Views Asked by At

We use in the java project for our model the

org.eclipse.persistence.descriptors.RelationalDescriptor

that is casted then to the ClassDescriptor. For the db table objects this is working properly. But for such Descriptors for the db views without primary key the method

org.eclipse.persistence.sessions.Project.addDescriptor(...);

raises the run-time error

RelationalDescriptor: The primary key fields are not set for this descriptor

What could be done to read such views to get then the Vector<...> collections?

1

There are 1 best solutions below

0
samule barman On

We use in the java project for our model the

org.eclipse.persistence.descriptors.ClassDescriptor for the db table objects, that are working properly. But for such Descriptors for the db views without primary key the method

org.eclipse.persistence.sessions.Project.addDescriptor(...); raises the run-time error

RelationalDescriptor: The primary key fields are not set for this descriptor What could be done to read such views to get then the Vector<...> collections?

java primary-key toplink