Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||
View Issue Details | |||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||
0008096 | Openbravo ERP | Y. DBSourceManager | public | 2009-03-12 15:49 | 2009-03-26 17:40 | ||||||||||||||
Reporter | rafaroda | ||||||||||||||||||
Assigned To | marvintm | ||||||||||||||||||
Priority | immediate | Severity | major | Reproducibility | always | ||||||||||||||
Status | closed | Resolution | fixed | ||||||||||||||||
Platform | OS | 20 | OS Version | Ubuntu 7.10 | |||||||||||||||
Product Version | 2.40 | ||||||||||||||||||
Target Version | Fixed in Version | 2.40MP4 | |||||||||||||||||
Merge Request Status | |||||||||||||||||||
Review Assigned To | |||||||||||||||||||
OBNetwork customer | No | ||||||||||||||||||
Web browser | |||||||||||||||||||
Modules | Core | ||||||||||||||||||
Support ticket | |||||||||||||||||||
Regression level | |||||||||||||||||||
Regression date | |||||||||||||||||||
Regression introduced in release | |||||||||||||||||||
Regression introduced by commit | |||||||||||||||||||
Triggers an Emergency Pack | No | ||||||||||||||||||
Summary | 0008096: DBSourceManager: Constraint enabling should be done after onCreateDefault | ||||||||||||||||||
Description | DBSourceManager should enable new constraints after executing onCreateDefault and not before. | ||||||||||||||||||
Steps To Reproduce | 1) Create a new column in a XML table file with an onCreateDefault. For instance, in M_INOUT add: <column name="FREIGHT_CURRENCY_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"> <default/> <onCreateDefault><![CDATA[SELECT C_ACCTSCHEMA.C_CURRENCY_ID FROM C_ACCTSCHEMA, AD_CLIENTINFO, AD_CLIENT WHERE AD_CLIENTINFO.C_ACCTSCHEMA1_ID = C_ACCTSCHEMA.C_ACCTSCHEMA_ID AND AD_CLIENT.AD_CLIENT_ID = AD_CLIENTINFO.AD_CLIENT_ID AND AD_CLIENT.AD_CLIENT_ID = M_INOUT.AD_CLIENT_ID]]></onCreateDefault> </column> <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_MINOUT"> <reference local="FREIGHT_CURRENCY_ID" foreign="C_CURRENCY_ID"/> </foreign-key> 2) Create a new check constraint in this same XML table. <check name="M_INOUT_CURRENCY_CHECK"><![CDATA[(FREIGHTAMT IS NULL) OR (FREIGHT_CURRENCY_ID IS NOT NULL)]]></check> 3) Execute: ant update.database.structure [alterdatabase] SQL Command failed with: ERROR: check constraint "m_inout_currency_check" is violated by some row [alterdatabase] ALTER TABLE M_INOUT [alterdatabase] ADD CONSTRAINT M_INOUT_CURRENCY_CHECK CHECK ((FREIGHTAMT IS NULL) OR (FREIGHT_CURRENCY_ID IS NOT NULL)) | ||||||||||||||||||
Proposed Solution | DBSourceManager should enable new constraints after executing onCreateDefault. | ||||||||||||||||||
Additional Information | |||||||||||||||||||
Tags | No tags attached. | ||||||||||||||||||
Relationships |
| ||||||||||||||||||
Attached Files | |||||||||||||||||||
Issue History | |||||||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||||||
2009-03-12 15:50 | rafaroda | Type | defect => backport | ||||||||||||||||
2009-03-12 15:50 | rafaroda | fix_in_branch | => 2.40 | ||||||||||||||||
2009-03-12 15:51 | rafaroda | Note Added: 0014612 | |||||||||||||||||
2009-03-12 15:51 | rafaroda | Priority | high => immediate | ||||||||||||||||
2009-03-12 15:51 | rafaroda | Relationship added | blocks 0007957 | ||||||||||||||||
2009-03-12 15:52 | rafaroda | Proposed Solution updated | |||||||||||||||||
2009-03-12 16:36 | rafaroda | Note Edited: 0014612 | |||||||||||||||||
2009-03-12 17:18 | hgbot | Checkin | |||||||||||||||||
2009-03-12 17:18 | hgbot | Note Added: 0014619 | |||||||||||||||||
2009-03-12 17:18 | hgbot | Status | scheduled => resolved | ||||||||||||||||
2009-03-12 17:18 | hgbot | Resolution | open => fixed | ||||||||||||||||
2009-03-12 17:20 | hgbot | Checkin | |||||||||||||||||
2009-03-12 17:20 | hgbot | Note Added: 0014620 | |||||||||||||||||
2009-03-12 17:20 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/stable/2.40/rev/5fb560290c79acef7ce219f5322faa355fb531f3 [^] | ||||||||||||||||
2009-03-24 11:01 | psarobe | Fixed in Version | => 2.40MP4 | ||||||||||||||||
2009-03-26 17:40 | psarobe | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|