Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0014020 | Openbravo ERP | Y. DBSourceManager | public | 2010-07-21 13:10 | 2012-09-24 23:32 |
|
Reporter | marvintm | |
Assigned To | marvintm | |
Priority | normal | Severity | major | Reproducibility | always |
Status | scheduled | Resolution | open | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0014020: oncreatedefaults which reference other columns from the same record are not correctly executed |
Description | Oncreatedefault expressions which reference other columns of the same record are not correctly executed. This happens because oncreatedefaults are currently used in two different kind of sql statements:
- UPDATE table SET column=(oncreatedefault) WHERE column IS NULL
- INSERT INTO table (c1, c2, ..., cn) SELECT (v1, v2, ..., oncreatedefault) FROM table_
This second statement will not work with oncreatedefaults which make a reference to the table. However, this second statements are actually not needed anymore, because of a previous change in the execution of NOT NULL constraints.
|
Steps To Reproduce | |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | design defect | 0014157 | | scheduled | marvintm | Check constraints should be disabled so that oncreatedefaults can work correctly | related to | defect | 0014193 | | closed | alostale | Oncreatedefault for column commercial_tier in ad_module is illegal, because it references other columns |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2010-07-21 13:10 | marvintm | New Issue | |
2010-07-21 13:10 | marvintm | Assigned To | => marvintm |
2010-07-21 13:13 | hgbot | Checkin | |
2010-07-21 13:13 | hgbot | Note Added: 0029437 | |
2010-07-21 13:13 | hgbot | Status | new => resolved |
2010-07-21 13:13 | hgbot | Resolution | open => fixed |
2010-07-21 13:13 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/c8ea94ac56969b1381987094b871ab17cd584bb9 [^] |
2010-07-21 13:14 | hgbot | Checkin | |
2010-07-21 13:14 | hgbot | Note Added: 0029438 | |
2010-07-21 13:14 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/c8ea94ac56969b1381987094b871ab17cd584bb9 [^] => http://code.openbravo.com/erp/devel/pi/rev/220470337d06980a66996b02fc1f7db9f951250d [^] |
2010-07-27 15:41 | hudsonbot | Checkin | |
2010-07-27 15:41 | hudsonbot | Note Added: 0029593 | |
2010-07-29 12:10 | alostale | Status | resolved => closed |
2010-07-29 12:10 | alostale | Fixed in Version | => 2.50MP21 |
2010-07-30 00:00 | anonymous | sf_bug_id | 0 => 3036811 |
2010-08-16 09:55 | marvintm | Note Added: 0029980 | |
2010-08-16 09:55 | marvintm | Status | closed => new |
2010-08-16 09:55 | marvintm | Resolution | fixed => open |
2010-08-16 09:55 | marvintm | Fixed in Version | 2.50MP21 => |
2010-08-16 09:58 | hgbot | Checkin | |
2010-08-16 09:58 | hgbot | Note Added: 0029982 | |
2010-08-16 10:01 | marvintm | Relationship added | related to 0014193 |
2010-08-16 10:02 | hgbot | Checkin | |
2010-08-16 10:02 | hgbot | Note Added: 0029987 | |
2010-08-16 22:29 | hudsonbot | Checkin | |
2010-08-16 22:29 | hudsonbot | Note Added: 0030036 | |
2010-08-30 09:02 | alostale | Status | new => scheduled |
2012-02-22 15:23 | marvintm | Type | defect => design defect |
2012-09-10 15:50 | alostale | Relationship added | related to 0014157 |
2012-09-24 23:32 | AugustoMauch | Note Added: 0052488 | |
2012-09-24 23:32 | AugustoMauch | Priority | urgent => normal |
Notes |
|
(0029437)
|
hgbot
|
2010-07-21 13:13
|
|
Repository: erp/devel/dbsm-main
Changeset: c8ea94ac56969b1381987094b871ab17cd584bb9
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jul 21 13:12:26 2010 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/c8ea94ac56969b1381987094b871ab17cd584bb9 [^]
Fixed issue 14020. oncreatedefaults which reference other columns should work now.
The main change basically has been not to execute the oncreatedefault on the INSERT SELECT statement which is executed when a table is recreated. This will allow oncreatedefaults which reference other tables and columns to work, and the statements shouldn't be needed anyway, because the same oncreatedefault is executed at the end of the update.database process, and the NOT NULL constraints are not activated when the data is copied.
---
M src/org/apache/ddlutils/platform/SqlBuilder.java
---
|
|
|
(0029438)
|
hgbot
|
2010-07-21 13:14
|
|
Repository: erp/devel/pi
Changeset: 220470337d06980a66996b02fc1f7db9f951250d
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jul 21 13:13:07 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/220470337d06980a66996b02fc1f7db9f951250d [^]
Fixed issue 14020. oncreatedefaults which reference other columns should work now.
> The main change basically has been not to execute the oncreatedefault on the INSERT SELECT statement which is executed when a table is recreated. This will allow oncreatedefaults which reference other tables and columns to work, and the statements shouldn't be needed anyway, because the same oncreatedefault is executed at the end of the update.database process, and the NOT NULL constraints are not activated when the data is copied.
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|
|
|
|
|
|
Due to this issue:
https://issues.openbravo.com/view.php?id=14157 [^]
this fix is a problem when installing modules which do not yet contain information for some columns with oncreatedefaults and check constraints (such as the iscommercial column). Therefore, the fix will be reverted until the issue is fixed. |
|
|
(0029982)
|
hgbot
|
2010-08-16 09:58
|
|
|
|
(0029987)
|
hgbot
|
2010-08-16 10:02
|
|
|
|
|
|
|
|
Effort: 5
Impact: low
Plan: mid |
|