Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008631Openbravo ERP02. Master data managementpublic2009-04-18 12:402011-02-04 09:14
rentidee 
rmorley 
normalmajorhave not tried
newopen 
20rPath Linux
2.50alpha-r11 
 
Core
No
0008631: Hooks in DAL (prerequisit for multi master replication of offline databases)
There should be some type of hook possible for a module to change the behavior of let's say delete in SessionHandler. It should be possible that a module is adding some additional functionality to the default behavior of hibernate.

I try to explain this:

I need urgently additional functionality in case any record get's deleted in the database, in any table.

In case of a delete the primary id should be written into an extra table. The table contains only the date of the deletion, the user who deleted the record, the table id and the id of the deleted record

Why do I need this? I try to synchronize two databases. One of them is stored on a laptop which is primarly offline. In case an internet connection exists I sync all new and changed rows in the tables on the laptop with the office server using rest web services.

That works fine for insert and update. But this does not work in case I deleted a record on the laptop. I need this information, so I can delete all the records on the office server

It would be so easy. I iterate through all the records of my delete table on the laptops database and remove this columns on the office server using rest.

Adding such a feature would enable openbravo to become multi master replicatable.

Additionally I would like to add the same functionality for inserts and updates.
In my deletion table I could also add changes and additions. It would increase performance during the sync process because it would not be necessary to query all the changes in every table the laptop and the office database posseses, but only the changes made since the last sync

Ok. It is possible to add this features using triggers in the database tables, but from the point of architecture it would be nice to inject additional functionality like inversion of control (Spring) directly into the sessionhandler


In a second step I would like to add an approval system. Again hooks are required so that a deletion of a record must be approved by an officer first before a deletion,addition or update can be performed on the office server by a laptop user (salesman)
Adding inversion of control to sessionHandler would be nice :-)
No tags attached.
Issue History
2009-04-18 12:40rentideeNew Issue
2009-04-18 12:40rentideeAssigned To => rafaroda
2009-04-23 11:48rafarodaAssigned Torafaroda => pjuvara
2011-02-04 09:14jpabloaeAssigned Topjuvara => rmorley

There are no notes attached to this issue.