Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029284 | Openbravo ERP | Y. DBSourceManager | public | 2015-03-16 09:53 | 2015-04-28 16:58 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR15Q2 | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
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 | 0029284: Oracle: onCretateDefault not executed for appended non mandatory columns |
Description | When a new non mandatory column with an onCreateDefault different to its default is appended, the new column has null values instead of the one defined in the onCretateDefault. OnCreateDefault should prevail over the default.
This can be reproduced in Oracle, in PostgreSQL it works as expected.
|
Steps To Reproduce | -For any non AD table add in xml files a non mandatory column with onCreateDefault 'A' and default 'B' (ensure this is the only change for that column in this table)
-Ensure this table has in DB at least one row
-Execute update.database
-Check new column values
-> It is 'A' (default value) but it should be what onCreateDefault defines ('B')
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | feature request | 0029270 | | closed | alostale | prevent table recreation in update.database |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-03-16 09:53 | alostale | New Issue | |
2015-03-16 09:53 | alostale | Assigned To | => alostale |
2015-03-16 09:53 | alostale | OBNetwork customer | => No |
2015-03-16 09:53 | alostale | Modules | => Core |
2015-03-16 09:53 | alostale | Triggers an Emergency Pack | => No |
2015-03-16 10:09 | alostale | Description Updated | bug_revision_view_page.php?rev_id=7973#r7973 |
2015-03-16 10:09 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=7975#r7975 |
2015-03-16 10:10 | alostale | Relationship added | related to 0029270 |
2015-03-16 10:58 | hgbot | Checkin | |
2015-03-16 10:58 | hgbot | Note Added: 0075609 | |
2015-03-16 10:58 | hgbot | Checkin | |
2015-03-16 10:58 | hgbot | Note Added: 0075610 | |
2015-03-16 10:58 | hgbot | Status | new => resolved |
2015-03-16 10:58 | hgbot | Resolution | open => fixed |
2015-03-16 10:58 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/4a5316fc24e18a102a83a3ae651afc7108455dde [^] |
2015-03-16 10:58 | hgbot | Checkin | |
2015-03-16 10:58 | hgbot | Note Added: 0075611 | |
2015-03-16 10:58 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/4a5316fc24e18a102a83a3ae651afc7108455dde [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/21e9c00975191584b2914b24dd54401e82891d70 [^] |
2015-03-16 23:53 | hudsonbot | Checkin | |
2015-03-16 23:53 | hudsonbot | Note Added: 0075667 | |
2015-03-17 08:05 | alostale | Review Assigned To | => AugustoMauch |
2015-03-17 08:05 | alostale | Description Updated | bug_revision_view_page.php?rev_id=8003#r8003 |
2015-03-17 08:05 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=8004#r8004 |
2015-03-23 09:21 | AugustoMauch | Description Updated | bug_revision_view_page.php?rev_id=8061#r8061 |
2015-03-23 10:20 | AugustoMauch | Note Added: 0075844 | |
2015-03-23 10:20 | AugustoMauch | Status | resolved => closed |
2015-03-23 10:20 | AugustoMauch | Fixed in Version | => 3.0PR15Q2 |
2015-04-28 16:58 | hgbot | Checkin | |
2015-04-28 16:58 | hgbot | Note Added: 0076835 | |
Notes |
|
(0075609)
|
hgbot
|
2015-03-16 10:58
|
|
Repository: erp/devel/dbsm-main
Changeset: 30c278456e796cfc43f89651e950615b28391f9f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 16 10:07:34 2015 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/30c278456e796cfc43f89651e950615b28391f9f [^]
related to bug 29284: added test cases to cover onCreateDefault behavior
Bug 0029284 makes two of these test cases fail in Oracle:
nonMandatoryOnCreateDefault[DB: oracle - append](org.openbravo.dbsm.test.model.data.CreateDefault)
java.lang.AssertionError: Value for column NM2
Expected: "A"
but: was null
nonMandatoryDifferentDefaultAndOnCreateDefault[DB: oracle - append](org.openbravo.dbsm.test.model.data.CreateDefault)
java.lang.AssertionError: Value for column NM4
Expected: "B"
but: was "A"
---
M src-test/src/org/openbravo/dbsm/test/base/DbsmTest.java
M src-test/src/org/openbravo/dbsm/test/model/ModelSuite.java
A src-test/model/createDefault/BASE_MODEL.xml
A src-test/model/createDefault/BASE_MODEL2.xml
A src-test/model/createDefault/M1.xml
A src-test/model/createDefault/M2.xml
A src-test/model/createDefault/M3.xml
A src-test/model/createDefault/M4.xml
A src-test/model/createDefault/NM1.xml
A src-test/model/createDefault/NM2.xml
A src-test/model/createDefault/NM3.xml
A src-test/model/createDefault/NM4.xml
A src-test/src/org/openbravo/dbsm/test/model/data/CreateDefault.java
---
|
|
|
(0075610)
|
hgbot
|
2015-03-16 10:58
|
|
Repository: erp/devel/pi
Changeset: 4a5316fc24e18a102a83a3ae651afc7108455dde
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 16 10:34:58 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4a5316fc24e18a102a83a3ae651afc7108455dde [^]
fixed bug 29284: onCreateDefault not executed for appended non mandatory cols
In Oracle new non mandatory columns with a onCreateDefault appended to a table
did not execute the onCreateDefault.
Current fix recreates the whole table in this case. A complete fix where the
onCreateDefault is executed in this case without the need of recreating the table
will be implemented in the scope of the "Prevent Table Recreation" project (see
issue 0029270).
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|
|
(0075611)
|
hgbot
|
2015-03-16 10:58
|
|
Repository: erp/devel/dbsm-main
Changeset: 21e9c00975191584b2914b24dd54401e82891d70
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 16 10:32:39 2015 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/21e9c00975191584b2914b24dd54401e82891d70 [^]
fixed bug 29284: onCreateDefault not executed for appended non mandatory cols
In Oracle new non mandatory columns with a onCreateDefault appended to a table
did not execute the onCreateDefault.
Current fix recreates the whole table in this case. A complete fix where the
onCreateDefault is executed in this case without the need of recreating the table
will be implemented in the scope of the "Prevent Table Recreation" project (see
issue 0029270).
---
M src/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
---
|
|
|
|
|
|
|
Code reviewed and verified in pi@b7fd6844f03f |
|
|
(0076835)
|
hgbot
|
2015-04-28 16:58
|
|
Repository: erp/devel/dbsm-main
Changeset: 78ed6f6270318043734bd11e5ae7346a71a5bcc0
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Mar 17 10:24:19 2015 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/78ed6f6270318043734bd11e5ae7346a71a5bcc0 [^]
[recreation] related to bug 29284
Oracle: prevent table recreation for non mandatory tables with onCreateDefault
---
M src/org/apache/ddlutils/platform/SqlBuilder.java
M src/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
---
|
|