2009 Aug 24 1:27 PM
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
2009 Aug 27 1:51 PM
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
2009 Aug 27 1:51 PM
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
2009 Aug 27 2:07 PM
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.