Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0041460 | Openbravo ERP | Y. DBSourceManager | public | 2019-07-26 10:03 | 2019-08-22 14:45 |
|
Reporter | mauricio_peccorini | |
Assigned To | alostale | |
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR19Q4 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0041460: A foreign key composed of more than 1 field will produced duplicated information when the database is exported by DBSM |
Description | If a primary/unique key is composted of 2 or more fields and a foreign key references it, DBSM will produce a cross-product of the referencing and referenced fields instead of the correct 1 to 1 association. |
Steps To Reproduce | 1. Create a table with a primary key composed by two or more fields
2. Create a second table and add a foreign key to the first table
3. Export the database using 'ant export.database'
4. Inspect the generated XML file, the list of fields in the foreign key will present the problem |
Proposed Solution | Fix the query that returns the list of fields of the constraints with the patch attached. |
Additional Information | |
Tags | No tags attached. |
Relationships | blocks | feature request | 0041484 | | closed | cberner | make job scheduling clusterizable |
|
Attached Files | PostgreSqlModelLoader.patch (1,113) 2019-07-26 10:03 https://issues.openbravo.com/file_download.php?file_id=13177&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2019-07-26 10:03 | mauricio_peccorini | New Issue | |
2019-07-26 10:03 | mauricio_peccorini | Assigned To | => platform |
2019-07-26 10:03 | mauricio_peccorini | File Added: PostgreSqlModelLoader.patch | |
2019-07-26 10:03 | mauricio_peccorini | Modules | => Core |
2019-07-26 10:03 | mauricio_peccorini | Triggers an Emergency Pack | => No |
2019-07-30 12:31 | alostale | Relationship added | blocks 0041484 |
2019-07-31 13:20 | hgbot | Checkin | |
2019-07-31 13:20 | hgbot | Note Added: 0113734 | |
2019-07-31 13:20 | hgbot | Status | new => resolved |
2019-07-31 13:20 | hgbot | Resolution | open => fixed |
2019-07-31 13:20 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/58004f8efa540f17758f4148ea71120eb5e62573 [^] |
2019-07-31 13:21 | hgbot | Checkin | |
2019-07-31 13:21 | hgbot | Note Added: 0113736 | |
2019-07-31 13:21 | hgbot | Checkin | |
2019-07-31 13:21 | hgbot | Note Added: 0113737 | |
2019-07-31 13:21 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/58004f8efa540f17758f4148ea71120eb5e62573 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/21e06878a298a5c2cce1c7c846be9462f01c95c2 [^] |
2019-07-31 13:22 | alostale | Assigned To | platform => alostale |
2019-07-31 13:22 | alostale | Review Assigned To | => caristu |
2019-08-02 09:14 | caristu | Note Added: 0113774 | |
2019-08-02 09:14 | caristu | Status | resolved => closed |
2019-08-02 09:14 | caristu | Fixed in Version | => 3.0PR19Q4 |
2019-08-22 14:45 | hudsonbot | Checkin | |
2019-08-22 14:45 | hudsonbot | Note Added: 0114188 | |
2019-08-22 14:45 | hudsonbot | Checkin | |
2019-08-22 14:45 | hudsonbot | Note Added: 0114190 | |
Notes |
|
(0113734)
|
hgbot
|
2019-07-31 13:20
|
|
Repository: erp/devel/pi
Changeset: 58004f8efa540f17758f4148ea71120eb5e62573
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Jul 31 13:20:31 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/58004f8efa540f17758f4148ea71120eb5e62573 [^]
fixed bug 41460 fixed bug 41366: allow multi col checks, don't upper case check
fixed issue 41460: multi colum FKs are not supported in PG
The query to obtain columns participating in FKs was incorrect in PG as it
assumed FKs have a single column.
As PG catalog stores FK column information as a couple of arrays (one for local
and another one for external column) each of them corresponding each other by
array's position, it is not possible to retrieve all information using a single
query. This has been changed so now column information is retrieved by an additional
query based on array's position.
fixed issue 41366: string literals in check contrains are upper cased
When exporting check constraints in PostgreSQL, they are converted to upper case
in order to keep ORA - PG stability. This conversion was to aggressive as string
literals were also modified.
Now strings are kept while the rest is still transformed.
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|
|
(0113736)
|
hgbot
|
2019-07-31 13:21
|
|
Repository: erp/devel/dbsm-main
Changeset: 69d70100c9928b5c48f30b3d46812ebc4e74adf2
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 30 11:19:09 2019 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/69d70100c9928b5c48f30b3d46812ebc4e74adf2 [^]
related to issue 41460: added test cases
---
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/multiColumnFK/PK/CHILD.xml
A src-test/model/multiColumnFK/PK/PARENT.xml
A src-test/model/multiColumnFK/unique/CHILD.xml
A src-test/model/multiColumnFK/unique/PARENT.xml
A src-test/src/org/openbravo/dbsm/test/model/MultiColumnFK.java
---
|
|
|
(0113737)
|
hgbot
|
2019-07-31 13:21
|
|
Repository: erp/devel/dbsm-main
Changeset: 21e06878a298a5c2cce1c7c846be9462f01c95c2
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 30 11:23:06 2019 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/21e06878a298a5c2cce1c7c846be9462f01c95c2 [^]
fixed issue 41460: multi colum FKs are not supported in PG
The query to obtain columns participating in FKs was incorrect in PG as it
assumed FKs have a single column.
As PG catalog stores FK column information as a couple of arrays (one for local
and another one for external column) each of them corresponding each other by
array's position, it is not possible to retrieve all information using a single
query. This has been changed so now column information is retrieved by an additional
query based on array's position.
---
M src/org/apache/ddlutils/platform/ModelLoaderBase.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlModelLoader.java
---
|
|
|
|
|
|
|
|
|
|
|