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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028143
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformmajoralways2014-11-11 17:362015-02-04 20:34
ReporteregoitzView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q1
StatusclosedFix in branchFixed in SCM revision6a58049e36b4
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

0028143: The database sequences are exported to xml files including also the next value

DescriptionThe database sequences are exported to xml files including also the next value.
Steps To ReproduceDefine a database sequence and after use it some times export it.
See that the next value is also exported.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0028677 newmarvintm Retail Modules unused sequences in webPOS module 
related to design defect 0029800 closedAugustoMauch Openbravo ERP Allow excluding sequences from model 
related to defect 0036916 closedcaristu Openbravo ERP PG10: update.database fails if there are DB sequences 

-  Notes
(0073762)
alostale (manager)
2015-01-26 09:30
edited on: 2015-01-26 09:42

There are several design defect in the sequences support by dbsm:

== Oracle ==

-Current sequence's value is exported to xml as starting value. Resulting in xml changes whenever the instance has been used in dev environment
-When updating DB current value in DB is compared with starting value in xml, resulting in the sequence being recreated in each update.database
-Any change in the sequence results in the sequence being completely recreated by update.database.

== PostgreSQL ==

-Sequence's start and increment are always set to 1. This makes not possible to define in a postgresql development environment a sequence with other values.
-If the xml files contains other values for start or increment, a change is always detected recreating the sequence. This recreation occurs in all subsequent update.database.

== Solution ==

For both, Oracle and PostgreSQL.
-Export to xml sequences correctly taking into account start and increment values, but not exporting current value.
-Do not recreate sequences for any model change. When there are changes in start or increment, the sequence will be altered keeping current sequence number.

== Test cases ==

Defined in https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-8030 [^]

(0073778)
hgbot (developer)
2015-01-26 14:14

Repository: erp/devel/pi
Changeset: 6a58049e36b4a93eddbdc395bedb23e5581ba0b2
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Jan 26 14:13:56 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6a58049e36b4a93eddbdc395bedb23e5581ba0b2 [^]

fixed issue 28143: proper support for DB sequences

  Several fixes for supporting DB sequences both in Oracle and PostgreSQL.

   -Oracle min number is properly obtained instead of current value
   -PG min and increment are properly obtained instead of hardcoding them to 1
   -Both changes in min and increment do not cause sequence recreation

---
M src-db/database/lib/dbsourcemanager.jar
---
(0073780)
alostale (manager)
2015-01-26 14:16

Fixed in dbsm repo by changesets:

https://code.openbravo.com/erp/devel/dbsm-main/rev/f64ac3268016 [^]
https://code.openbravo.com/erp/devel/dbsm-main/rev/6fe5f1388455 [^]
https://code.openbravo.com/erp/devel/dbsm-main/rev/ec86449b7d14 [^]
(0073784)
AugustoMauch (manager)
2015-01-26 16:35

Code reviewed and verified in pi@6a58049e36b4
(0074183)
hudsonbot (developer)
2015-02-04 20:34

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/f36c91d0ad63 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2014-11-11 17:36 egoitz New Issue
2014-11-11 17:36 egoitz Assigned To => AugustoMauch
2014-11-11 17:36 egoitz Modules => Core
2014-11-11 17:36 egoitz Triggers an Emergency Pack => No
2015-01-26 08:57 alostale Relationship added related to 0028677
2015-01-26 09:01 alostale Assigned To AugustoMauch => alostale
2015-01-26 09:30 alostale Note Added: 0073762
2015-01-26 09:42 alostale Note Edited: 0073762 View Revisions
2015-01-26 14:14 hgbot Checkin
2015-01-26 14:14 hgbot Note Added: 0073778
2015-01-26 14:14 hgbot Status new => resolved
2015-01-26 14:14 hgbot Resolution open => fixed
2015-01-26 14:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6a58049e36b4a93eddbdc395bedb23e5581ba0b2 [^]
2015-01-26 14:16 alostale Note Added: 0073780
2015-01-26 14:17 alostale Review Assigned To => AugustoMauch
2015-01-26 16:35 AugustoMauch Note Added: 0073784
2015-01-26 16:35 AugustoMauch Status resolved => closed
2015-01-26 16:35 AugustoMauch Fixed in Version => 3.0PR15Q1
2015-02-04 20:34 hudsonbot Checkin
2015-02-04 20:34 hudsonbot Note Added: 0074183
2015-05-06 12:56 egoitz Relationship added related to 0029800
2017-09-21 14:05 alostale Relationship added related to 0036916


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker