Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Persistent class for a database view; cannot activate

Former Member
0 Likes
482

I've created a database view which represents data from multiple ECC tables, joined on several fields.

Now I want to access the data available from that view through a persistent class.

I have mapped all fields as readonly, but it doesn't work. The error I'm getting when I check the mapping is:

"Database operations with view ZMYVIEW are not allowed".

Any ideas?

Edited by: René van Mil on Aug 24, 2009 2:27 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
391

Hello René,

I have an assumption:

The persistency framework provides functionality to create, read, update and delete objects (through the agent class). If you have marked all the properties of this object as "read only", this is only relevant when you work with existing object (so they are protected against updates). But the framwork will also create code which inserts or deletes complete records. If the view is read-only (which it is if you used several tables with a join), this cannot work.

Regards

David

2 REPLIES 2
Read only

Former Member
0 Likes
392

Hello René,

I have an assumption:

The persistency framework provides functionality to create, read, update and delete objects (through the agent class). If you have marked all the properties of this object as "read only", this is only relevant when you work with existing object (so they are protected against updates). But the framwork will also create code which inserts or deletes complete records. If the view is read-only (which it is if you used several tables with a join), this cannot work.

Regards

David

Read only

0 Likes
391

David, I was thinking the same, it probably just doesn't work with tables joined in a view. Though I was hoping I might have done something wrong creating the persistent class.

So I guess I'll have to write the class to access the view myself.