Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021955Openbravo ERPY. DBSourceManagerpublic2012-10-16 17:202012-12-04 15:22
egoitz 
AugustoMauch 
urgentmajoralways
closedfixed 
5
3.0MP16 
3.0MP183.0MP18 
marvintm
Core
No
0021955: The naming exceptions do not work with unique constraints
If you add on the exceptions tab of a module a unique constraint because you want to change it, after export it is correctly exported to your module but fails on the update.
The error message can be as following:


There are multiple uniques or indices in table M_PRODUCT_CATEGORY with the name M_PRODUCT_CATEGORY_VALUE
-Define a new module and check is as indeveloment
-go to exception tab and add a new line for unique constraint.
Table=M_PRODUCT_CATEGORY
object name=M_PRODUCT_CATEGORY_VALUE
-Export the module with ant export.database.
-After that execute the update.dabase

You get the following error:


There are multiple uniques or indices in table M_PRODUCT_CATEGORY with the name M_PRODUCT_CATEGORY_VALUE
No tags attached.
Issue History
2012-10-16 17:20egoitzNew Issue
2012-10-16 17:20egoitzAssigned To => marvintm
2012-10-16 17:20egoitzModules => Core
2012-10-16 17:20egoitzResolution time => 1352502000
2012-10-16 18:13egoitzIssue Monitored: networkb
2012-10-29 13:36egoitzNote Added: 0053765
2012-10-29 13:36egoitzTarget Version3.0MP17 => 3.0MP18
2012-11-19 13:43AugustoMauchReview Assigned To => marvintm
2012-11-19 13:43AugustoMauchAssigned Tomarvintm => AugustoMauch
2012-11-19 13:43AugustoMauchIssue Monitored: marvintm
2012-11-19 13:49hgbotCheckin
2012-11-19 13:49hgbotNote Added: 0054314
2012-11-19 13:49hgbotStatusnew => resolved
2012-11-19 13:49hgbotResolutionopen => fixed
2012-11-19 13:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/142819e9e1e38d992c985b05d781cc09cbbd52ed [^]
2012-11-19 15:01hgbotCheckin
2012-11-19 15:01hgbotNote Added: 0054315
2012-11-19 15:01hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/142819e9e1e38d992c985b05d781cc09cbbd52ed [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/92fed4a43a8c3304716ad952d101739af30cd006 [^]
2012-11-21 06:07hudsonbotCheckin
2012-11-21 06:07hudsonbotNote Added: 0054398
2012-12-04 15:22marvintmStatusresolved => closed
2012-12-04 15:22marvintmFixed in Version => 3.0MP18

Notes
(0053765)
egoitz   
2012-10-29 13:36   
The exceptions are used to modify elements from other modules. In the case of the unique constraint adding a new column to the constraint has a risk because selects of the application can be designed for the constraint defined. Changing it can make the select to return different values than expected producing an incorrect behavior on the application.
(0054314)
hgbot   
2012-11-19 13:49   
Repository: erp/devel/pi
Changeset: 142819e9e1e38d992c985b05d781cc09cbbd52ed
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Nov 19 13:49:27 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/142819e9e1e38d992c985b05d781cc09cbbd52ed [^]

Fixes issue 21955: Naming exceptions works with unique constraints

There was a bug that prevented exisint unique constraints from being removed. After fixing this bug, the update.database task no longer fails after creating a unique constraint naming exception

---
M src-db/database/lib/dbsourcemanager.jar
---
(0054315)
hgbot   
2012-11-19 15:01   
Repository: erp/devel/dbsm-main
Changeset: 92fed4a43a8c3304716ad952d101739af30cd006
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Nov 19 15:00:49 2012 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/92fed4a43a8c3304716ad952d101739af30cd006 [^]

Fixes issue 21955: Naming exceptions works with unique constraints

---
M src/org/apache/ddlutils/model/Table.java
---
(0054398)
hudsonbot   
2012-11-21 06:07   
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/c3c5e61b0164 [^]

Maturity status: Test