Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0014157 | Openbravo ERP | Y. DBSourceManager | public | 2010-08-10 12:27 | 2012-09-24 23:31 |
|
Reporter | marvintm | |
Assigned To | marvintm | |
Priority | normal | Severity | major | Reproducibility | have not tried |
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 | 0014157: Check constraints should be disabled so that oncreatedefaults can work correctly |
Description | Check constraints currently are enabled when a table is created, or recreated, and never disabled after that. This works correctly in case there are no oncreatedefaults which affect the columns in the check, but fails when an oncreatedefault is supposed to fill a column which is needed by a check constraint.
Oncreatedefaults are executed at the end of the update process, after the Application Dictionary data has been updated. Therefore, there is a point in the update in which the check constraints could be temporarily violated (although the data would comply with the check at the end of the process). Thus, as it is currently, the process fails because the check constraint is activated at that point.
|
Steps To Reproduce | - Create a check constraint which affects a newly created column in the AD (which has an oncreatedefault).
- Install a module which doesn't have a value for that column. The process will fail. |
Proposed Solution | The solution is obviously to disable the check constraints while the Application Dictionary data is being updated. This solution was already adopted with NOT NULL constraints (which have basically the same problem), and it makes sense to do it also for check constraints. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | design defect | 0014020 | | scheduled | marvintm | oncreatedefaults which reference other columns from the same record are not correctly executed |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2010-08-10 12:27 | marvintm | New Issue | |
2010-08-10 12:27 | marvintm | Assigned To | => marvintm |
2010-08-11 09:30 | hgbot | Checkin | |
2010-08-11 09:30 | hgbot | Note Added: 0029880 | |
2010-08-12 21:11 | hudsonbot | Checkin | |
2010-08-12 21:11 | hudsonbot | Note Added: 0029925 | |
2010-08-16 08:11 | alostale | Status | new => scheduled |
2010-08-16 09:58 | hgbot | Checkin | |
2010-08-16 09:58 | hgbot | Note Added: 0029983 | |
2010-08-16 10:02 | hgbot | Checkin | |
2010-08-16 10:02 | hgbot | Note Added: 0029988 | |
2010-08-16 22:29 | hudsonbot | Checkin | |
2010-08-16 22:29 | hudsonbot | Note Added: 0030037 | |
2012-01-30 17:54 | marvintm | Note Added: 0044710 | |
2012-01-30 17:54 | marvintm | Type | defect => design defect |
2012-09-10 15:50 | alostale | Relationship added | related to 0014020 |
2012-09-24 23:31 | AugustoMauch | Note Added: 0052486 | |
2012-09-24 23:31 | AugustoMauch | Priority | urgent => normal |
Notes |
|
(0029880)
|
hgbot
|
2010-08-11 09:30
|
|
Repository: erp/devel/pi
Changeset: 401aaff3c6f6f3df6d2bc9af012f5179e3967267
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Aug 10 12:37:55 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/401aaff3c6f6f3df6d2bc9af012f5179e3967267 [^]
[licensce] Tier constraint implemented as trigger
DB check constraint for tier has been implemeted as trigger, due to
issue 14157 the constraints are enabled before oncreatedefault is
applied, so it fails installing old commercial modules.
---
M src-db/database/model/tables/AD_MODULE.xml
M src-db/database/model/triggers/AD_MODULE_VERSION_TRG.xml
---
|
|
|
|
|
|
(0029983)
|
hgbot
|
2010-08-16 09:58
|
|
|
|
(0029988)
|
hgbot
|
2010-08-16 10:02
|
|
|
|
|
|
|
|
Although this change probably makes sense from a functional point of view, it would be very bad for performance reasons, and would also be very risky and likely to create regressions.
Changing this issue to design defect. |
|
|
|
Effort: 5
Impact: low
Plan: mid |
|