Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0014020
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] Y. DBSourceManagermajoralways2010-07-21 13:102012-09-24 23:32
ReportermarvintmView Statuspublic 
Assigned Tomarvintm 
PrioritynormalResolutionopenFixed in Version
StatusscheduledFix in branchFixed in SCM revision220470337d06
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0014020: oncreatedefaults which reference other columns from the same record are not correctly executed

DescriptionOncreatedefault 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.

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0014157 scheduledmarvintm Check constraints should be disabled so that oncreatedefaults can work correctly 
related to defect 0014193 closedalostale Oncreatedefault for column commercial_tier in ad_module is illegal, because it references other columns 

-  Notes
(0029437)
hgbot (developer)
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 (developer)
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
---
(0029593)
hudsonbot (developer)
2010-07-27 15:41

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/220470337d06 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/634cc0909ed2 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17922.obx [^]
(0029980)
marvintm (developer)
2010-08-16 09:55

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 (developer)
2010-08-16 09:58

Repository: erp/devel/dbsm-main
Changeset: 2516e1a6419edc3b329d40147e3fbef00b199f8c
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Aug 16 09:58:20 2010 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/2516e1a6419edc3b329d40147e3fbef00b199f8c [^]

Reverted change related to issue 14020.
Will do the change after the issue 14157 is fixed.

---
M src/org/apache/ddlutils/platform/SqlBuilder.java
---
(0029987)
hgbot (developer)
2010-08-16 10:02

Repository: erp/devel/pi
Changeset: 5faedaed0aafa587ca1f9e3302a86d2935a8fac5
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Aug 16 10:02:04 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5faedaed0aafa587ca1f9e3302a86d2935a8fac5 [^]

Reverted change related to issue 14020.
Will do the change after the issue 14157 is fixed.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0030036)
hudsonbot (developer)
2010-08-16 22:29

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/5faedaed0aaf [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/cb95e054be79 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18165.obx [^]
(0052488)
AugustoMauch (manager)
2012-09-24 23:32

Effort: 5
Impact: low
Plan: mid

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker