Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009376Openbravo ERPA. Platformpublic2009-06-08 13:082009-07-27 00:00
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
pi 
pi2.50MP3 
Core
No
0009376: Uninstalling a module which added a column in a standard Openbravo table fails
During the uninstall the column is removed from the model, the uninstall will run generate.entities.quick but column removal is not detected and the entities are not regenerated. Then the apply modules task has reinitializeModel="true" it will reread the model and reinitialize the dal. This however results in an error as the new model does not contain the module column anymore but it keeps old business object classes in-memory (which have the old removed column).

So the business object classes (in-memory as they have already been loaded) are not insync anymore with the model. This results in an exception when applying models.

Proposed changes:
- The generate.entities.quick has to be change to generate.entities
- reinitializeModel has to be set to false for the case of applying a module.

The model which causes an exception is attached.
250MP3releasecandidate
? org.openbravo.hcm.common-1.0.0.obx (137,924) 2009-06-08 13:08
https://issues.openbravo.com/file_download.php?file_id=1399&type=bug
Issue History
2009-06-08 13:08mtaalNew Issue
2009-06-08 13:08mtaalAssigned To => mtaal
2009-06-08 13:08mtaalFile Added: org.openbravo.hcm.common-1.0.0.obx
2009-06-08 13:55hgbotCheckin
2009-06-08 13:55hgbotNote Added: 0017092
2009-06-08 13:55hgbotStatusnew => resolved
2009-06-08 13:55hgbotResolutionopen => fixed
2009-06-08 13:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/97e2fba62f90beeb50182e5e8cddf1a0ad8c9772 [^]
2009-06-08 16:49AinhoaPagolaNote Added: 0017108
2009-06-22 11:09psarobeFixed in Version => main
2009-07-21 16:24psarobeFixed in Versionmain => 2.50MP3
2009-07-21 16:26psarobeTag Attached: 250MP3releasecandidate
2009-07-26 22:01psarobeStatusresolved => closed
2009-07-26 22:01psarobeNote Added: 0018621
2009-07-27 00:00anonymoussf_bug_id0 => 2827482

Notes
(0017092)
hgbot   
2009-06-08 13:55   
Repository: erp/devel/pi
Changeset: 97e2fba62f90beeb50182e5e8cddf1a0ad8c9772
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Jun 08 13:54:55 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/97e2fba62f90beeb50182e5e8cddf1a0ad8c9772 [^]

Fixes issue 9376: Uninstalling a module which added a column in a standard Openbravo table fails

---
M build.xml
M src/build.xml
---
(0017108)
AinhoaPagola   
2009-06-08 16:49   
I have tested the solution with a module where the issue was reproducible. I could successfully install and uninstall the module.
The solution works for me.

Thank you Martin.
(0018621)
psarobe   
2009-07-26 22:01   
Thanks Ainhoa