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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029284
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagermajoralways2015-03-16 09:532015-04-28 16:58
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version3.0PR15Q2
StatusclosedFix in branchFixed in SCM revision21e9c0097519
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029284: Oracle: onCretateDefault not executed for appended non mandatory columns

DescriptionWhen 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')
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0029270 closedalostale prevent table recreation in update.database 

-  Notes
(0075609)
hgbot (developer)
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 (developer)
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 (developer)
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
---
(0075667)
hudsonbot (developer)
2015-03-16 23:53

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/28f92fd2fba0 [^]
Maturity status: Test
(0075844)
AugustoMauch (manager)
2015-03-23 10:20

Code reviewed and verified in pi@b7fd6844f03f
(0076835)
hgbot (developer)
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
---

- 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 Modules => Core
2015-03-16 09:53 alostale Triggers an Emergency Pack => No
2015-03-16 10:09 alostale Description Updated View Revisions
2015-03-16 10:09 alostale Steps to Reproduce Updated View Revisions
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 View Revisions
2015-03-17 08:05 alostale Steps to Reproduce Updated View Revisions
2015-03-23 09:21 AugustoMauch Description Updated View Revisions
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker