Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0034048 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2016-09-21 16:31 | 2016-09-23 09:34 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | platform | |||||||
Priority | high | Resolution | invalid | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0034048: Not null constraint removed from database under some circumnstances | |||||||
Description | A not null constraint defined for a column of an AD table disappears when AD XML files are older than new column definition, if that column does not have an oncreatedefault. | |||||||
Steps To Reproduce | 1) Install the attached patch which adds a new test column to the OBUIAPP_Report table (this is an AD table) 2) Install the following module: https://code.openbravo.com/erp/mods/org.openbravo.platform.features/ [^] this module contains some sourcedata for the OBUIAPP_Report table which obviously does not define any value for the test column 3) Notice that after the execution of the update.database task, the NOT NULL constraint is gone for the test column in the database. In addition, the following error is displayed: [java] 38957 INFO - Batch statement failed. Rolling back and retrying all the statements in a non-batched connection. [java] 46518 WARN - SQL Command failed with: ERROR: column "test" contains null values [java] 46528 WARN - -- END [java] ALTER TABLE OBUIAPP_REPORT ALTER TEST SET NOT NULL [java] 48633 INFO - Executed 886 SQL command(s) with 1 error(s) Note: this error can be workarounded by defining an onCreateDefault[1] for the column. [1] http://wiki.openbravo.com/wiki/How_to_define_an_on_Create_Default [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | testColumn.diff [^] (4,461 bytes) 2016-09-21 17:32 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0090185) alostale (manager) 2016-09-23 09:34 |
Working as designed: AD not null columns require of an on create default in order to populate values when they are not present in xml. |
Issue History | |||
Date Modified | Username | Field | Change |
2016-09-21 16:31 | caristu | New Issue | |
2016-09-21 16:31 | caristu | Assigned To | => platform |
2016-09-21 16:31 | caristu | Modules | => Core |
2016-09-21 16:31 | caristu | Triggers an Emergency Pack | => No |
2016-09-21 16:31 | caristu | File Added: testColumn.diff | |
2016-09-21 16:33 | caristu | Relationship added | related to 0029270 |
2016-09-21 16:34 | caristu | Description Updated | View Revisions |
2016-09-21 16:45 | caristu | Proposed Solution updated | |
2016-09-21 16:55 | caristu | Steps to Reproduce Updated | View Revisions |
2016-09-21 16:55 | caristu | Steps to Reproduce Updated | View Revisions |
2016-09-21 16:59 | caristu | Description Updated | View Revisions |
2016-09-21 17:32 | caristu | File Deleted: testColumn.diff | |
2016-09-21 17:32 | caristu | File Added: testColumn.diff | |
2016-09-23 09:34 | alostale | Note Added: 0090185 | |
2016-09-23 09:34 | alostale | Status | new => closed |
2016-09-23 09:34 | alostale | Resolution | open => invalid |
Copyright © 2000 - 2009 MantisBT Group |