Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022867Openbravo ERP00. Application dictionarypublic2013-01-23 11:472013-04-09 17:23
neil_smith 
AugustoMauch 
normalmajoralways
newopen 
5
 
 
Openbravo 3.0
No
0022867: Allow CRUD operations on views
Alow to insert, update and delete on views through the database rules (CREATE RULE rule_name AS ON DELETE TO table_name DO INSTEAD...).

This feature worked before (3.0MP8 I think... not sure of the MP). I installed MP14.2 and it is not supported any more (the rule had to be re-created by hand, but the operations on views worked).

If the view is defined as a view, it is not possible to delete records.
If I set the view not as a view, I get warnings that the client, organization, ... fields don't have the mandory setting in the database metadata.
Create a view on a table in the database.
Create a rule in the database for deletion on the view so that it deletes in table the view is based on.
Create the table in OB and define it as a view.
Create a window on the view and add it to the menu.
Compile and access the new window.
-> It is not possible to delete a record (the garbage is deactivated).

Modify the view in OB and uncheck the view checkbox
Compile
You get warnings
<code>
Column xxx mandatory setting not found in the database metadata. A cause can be that the column does not exist in the database schema
</code>
Access the window, you can delete from the view and it deletes from the according table defined in the rule.
Integrate support of Database Rules in OB (export.database, ...)
Allow CRUD operations on views, if we don't want to, it is possible to uncheck the 'Deletable Records' in the table and set the tab as read-only.
No tags attached.
Issue History
2013-01-23 11:47neil_smithNew Issue
2013-01-23 11:47neil_smithAssigned To => AugustoMauch
2013-01-23 11:47neil_smithModules => Openbravo 3.0
2013-01-23 11:47neil_smithTriggers an Emergency Pack => No
2013-04-09 17:23AugustoMauchNote Added: 0057813
2013-04-09 17:23AugustoMauchTypedefect => feature request

Notes
(0057813)
AugustoMauch   
2013-04-09 17:23   
In Openbravo it has never been possible to export/import database rules. Moved to feature request.