Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025557Openbravo ERP07. Sales managementpublic2014-01-24 14:222014-03-14 19:45
jonalegriaesarte 
shankarb 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR14Q23.0PR14Q2 
AugustoMauch
Core
No
0025557: Is not possible to enter more than one datasource table in ORACLE
Is not possible to enter more than one datasource table in ORACLE. There is a unique constraint called AD_TABLE_CLASSNAME_PACKAGE_UN in AD_TABLE that has the fields: CLASSNAME and AD_PACKAGE_ID

When you introduce a "datasource table" you don't need the classname so you leave it to blank / null and then when you insert the second record with the
classname = null the constraint is violated in ORACLE.

For example:

Record 1
CLASSNAME: NULL
AD_PACKAGE_ID: 123

Record 2
CLASSNAME: NULL
AD_PACKAGE_ID: 123

Will violate the constraint in Oracle but not in PostgreSQL: https://www.pgrs.net/2008/01/11/postgresql-allows-duplicate-nulls-in-unique-columns/ [^]
- See Description of the issue
No tags attached.
related to defect 00259123.0PR14Q2 closed shankarb API Change Request : Drop constraint AD_TABLE_CLASSNAME_PACKAGE_UN from AD_Table 
has duplicate defect 0024989 closed AugustoMauch Cannot add more than one datasource based table on a package 
diff FixIssue25557.diff (1,316) 2014-01-28 10:07
https://issues.openbravo.com/file_download.php?file_id=6661&type=bug
Issue History
2014-01-24 14:22jonalegriaesarteNew Issue
2014-01-24 14:22jonalegriaesarteAssigned To => AugustoMauch
2014-01-24 14:22jonalegriaesarteModules => Core
2014-01-24 14:22jonalegriaesarteTriggers an Emergency Pack => No
2014-01-27 13:36alostaleRelationship addedhas duplicate 0024989
2014-01-28 07:16shankarbAssigned ToAugustoMauch => shankarb
2014-01-28 10:07shankarbFile Added: FixIssue25557.diff
2014-01-28 10:08shankarbStatusnew => scheduled
2014-01-28 10:08shankarbNote Added: 0063739
2014-01-28 10:08shankarbfix_in_branch => pi
2014-01-30 10:58dmitry_mezentsevNote Added: 0063799
2014-01-30 10:59dmitry_mezentsevNote Deleted: 0063799
2014-01-30 11:51shankarbReview Assigned To => AugustoMauch
2014-01-30 11:51shankarbfix_in_branchpi =>
2014-01-30 11:52shankarbIssue Monitored: AugustoMauch
2014-01-30 11:54hgbotCheckin
2014-01-30 11:54hgbotNote Added: 0063805
2014-01-30 11:54hgbotStatusscheduled => resolved
2014-01-30 11:54hgbotResolutionopen => fixed
2014-01-30 11:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/018b8e666e7db3f22cf14cd4de566eea3da2d2d3 [^]
2014-02-12 18:29hudsonbotCheckin
2014-02-12 18:29hudsonbotNote Added: 0064138
2014-02-13 12:04AugustoMauchNote Added: 0064221
2014-02-13 12:04AugustoMauchStatusresolved => closed
2014-02-13 12:04AugustoMauchFixed in Version => 3.0MP32
2014-03-06 11:17shankarbNote Added: 0064899
2014-03-06 11:17shankarbStatusclosed => new
2014-03-06 11:17shankarbResolutionfixed => open
2014-03-06 11:17shankarbFixed in VersionPR14Q2 =>
2014-03-06 11:18shankarbStatusnew => scheduled
2014-03-06 11:18shankarbfix_in_branch => pi
2014-03-06 11:18shankarbRelationship addedrelated to 0025912
2014-03-06 13:27hgbotCheckin
2014-03-06 13:27hgbotNote Added: 0064913
2014-03-06 13:27hgbotStatusscheduled => resolved
2014-03-06 13:27hgbotResolutionopen => fixed
2014-03-06 13:27hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/018b8e666e7db3f22cf14cd4de566eea3da2d2d3 [^] => http://code.openbravo.com/erp/devel/pi/rev/ea70861b5474946bd4bc13469e90cabef444568e [^]
2014-03-07 05:25hudsonbotCheckin
2014-03-07 05:25hudsonbotNote Added: 0064945
2014-03-10 10:20AugustoMauchNote Added: 0064977
2014-03-10 10:20AugustoMauchStatusresolved => closed
2014-03-10 10:20AugustoMauchFixed in Version => PR14Q2
2014-03-10 12:30AugustoMauchNote Added: 0064980
2014-03-10 12:30AugustoMauchStatusclosed => new
2014-03-10 12:30AugustoMauchResolutionfixed => open
2014-03-10 12:30AugustoMauchFixed in VersionPR14Q2 =>
2014-03-10 12:46hgbotCheckin
2014-03-10 12:46hgbotNote Added: 0064983
2014-03-10 12:46hgbotStatusnew => resolved
2014-03-10 12:46hgbotResolutionopen => fixed
2014-03-10 12:46hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/ea70861b5474946bd4bc13469e90cabef444568e [^] => http://code.openbravo.com/erp/devel/pi/rev/15a48f5b6cfe17887c83acf790369cb98f1a3234 [^]
2014-03-10 22:58hudsonbotCheckin
2014-03-10 22:58hudsonbotNote Added: 0065006
2014-03-14 19:45AugustoMauchNote Added: 0065170
2014-03-14 19:45AugustoMauchStatusresolved => closed
2014-03-14 19:45AugustoMauchFixed in Version => PR14Q2

Notes
(0063739)
shankarb   
2014-01-28 10:08   
Pushed to try
(0063805)
hgbot   
2014-01-30 11:54   
Repository: erp/devel/pi
Changeset: 018b8e666e7db3f22cf14cd4de566eea3da2d2d3
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Jan 30 16:20:10 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/018b8e666e7db3f22cf14cd4de566eea3da2d2d3 [^]

Fixes Issue 025557: Is not possible to enter more than one datasource table in ORACLE

Is not possible to enter more than one datasource table in ORACLE.
There is a unique constraint called AD_TABLE_CLASSNAME_PACKAGE_UN in AD_TABLE that has the fields: CLASSNAME and AD_PACKAGE_ID.
Changed the constraint to unique index to solve this issue.

---
M src-db/database/model/tables/AD_TABLE.xml
---
(0064138)
hudsonbot   
2014-02-12 18:29   
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/d1a5bb862230 [^]
Maturity status: Test
(0064221)
AugustoMauch   
2014-02-13 12:04   
Code reviewed and verified in pi@9d50bf45a6c9
(0064899)
shankarb   
2014-03-06 11:17   
Issue still reproducible. The issue will be fixed by adding an event handler instead of index.
(0064913)
hgbot   
2014-03-06 13:27   
Repository: erp/devel/pi
Changeset: ea70861b5474946bd4bc13469e90cabef444568e
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Mar 06 17:53:50 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/ea70861b5474946bd4bc13469e90cabef444568e [^]

Fixes Issue 0025557: Is not possible to enter more than one datasource table in ORACLE

Dropped constraint AD_TABLE_CLASSNAME_PACKAGE_UN as it is not accepting null values in Oracle.
Added event handler to handle the same logic.

---
M src-db/database/model/tables/AD_TABLE.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
A src/org/openbravo/event/ADTableEventHandler.java
---
(0064945)
hudsonbot   
2014-03-07 05:25   
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/9364dd72aca6 [^]
Maturity status: Test
(0064977)
AugustoMauch   
2014-03-10 10:20   
Code reviewed and verified in pi@8c76a7a6bf32
(0064980)
AugustoMauch   
2014-03-10 12:30   
Reopened, because it is not possible to save a change made on an existing table.

The problem is that when looking for tables with the same java classname and datapackage of the table being saved, the table being saved should not be taken into account.
(0064983)
hgbot   
2014-03-10 12:46   
Repository: erp/devel/pi
Changeset: 15a48f5b6cfe17887c83acf790369cb98f1a3234
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Mon Mar 10 17:14:30 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/15a48f5b6cfe17887c83acf790369cb98f1a3234 [^]

Fixes Issue 0025557: Is not possible to enter more than one datasource table in ORACLE

Duplication error is not raised when the same record is being updated.

---
M src/org/openbravo/event/ADTableEventHandler.java
---
(0065006)
hudsonbot   
2014-03-10 22:58   
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/b362f74ef31a [^]
Maturity status: Test
(0065170)
AugustoMauch   
2014-03-14 19:45   
Code reviewed and verified in pi@d7843bd87a36