Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011137Openbravo ERPY. DBSourceManagerpublic2009-10-26 18:222011-08-01 14:19
shuehner 
marvintm 
urgentminorhave not tried
closedfixed 
5
pi 
3.0MP2 
Core
No
0011137: The validation of modules done on export.database shows errors which belong to a module in the core module
If a module adds a column to a core table, then the validation done on export.database does show a validation error (if one exists) in the core module for this column instead of in the module.

Example where the 347 module module adds a new field to m_product (from core)

+++++++++++++++++++++++++++++++++++++++++++++++++++
Warnings for Validation type: NOT_PART_OF_FOREIGN_KEY
+++++++++++++++++++++++++++++++++++++++++++++++++++
Foreign Key Column M_PRODUCT.EM_Aeat347_Regioncode is not part of a foreign key constraint.
dev-platform-quick-wins
related to defect 0014172 closed marvintm Missleading warning info when packaging module: NOT_PART_OF_FOREIGN_KEY 
blocks backport 0017594 closed marvintm The validation of modules done on export.database shows errors which belong to a module in the core module 
Issue History
2009-10-26 18:22shuehnerNew Issue
2009-10-26 18:22shuehnerAssigned To => marvintm
2009-11-14 09:22fgredruelloIssue Monitored: fgredruello
2009-11-15 07:44iciordiaPrioritylow => urgent
2009-11-29 23:00fgredruelloIssue End Monitor: fgredruello
2010-01-05 12:49iciordiaStatusnew => scheduled
2010-01-05 12:49iciordiafix_in_branch => pi
2010-01-05 12:50iciordiaNote Added: 0023231
2010-04-06 17:05rafarodaIssue Monitored: rafaroda
2010-04-06 17:16rafarodaNote Added: 0025906
2010-04-14 15:22rafarodaNote Added: 0026186
2010-08-30 15:48rafarodaTag Attached: dev-platform-quick-wins
2010-08-30 16:50rafarodaRelationship addedrelated to 0014172
2010-09-22 15:51rafarodaNote Added: 0031298
2011-06-10 11:54maitefix_in_branchpi =>
2011-06-10 11:54maiteIssue Monitored: networkb
2011-06-10 11:56maiteTarget Version => 3.0MP2
2011-06-10 12:00maiteIssue cloned0017594
2011-06-10 12:01maiteRelationship addedblocks 0017594
2011-07-11 16:13hgbotCheckin
2011-07-11 16:13hgbotNote Added: 0038981
2011-07-11 16:13hgbotStatusscheduled => resolved
2011-07-11 16:13hgbotResolutionopen => fixed
2011-07-11 16:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ec2f20c12634f769388bf60f8b6e54f88e5a9e38 [^]
2011-07-14 15:53shuehnerNote Added: 0039063
2011-07-14 15:53shuehnerStatusresolved => closed
2011-08-01 14:19hudsonbotCheckin
2011-08-01 14:19hudsonbotNote Added: 0039582

Notes
(0023231)
iciordia   
2010-01-05 12:50   
It seems to be related with another similar issue reported by Martin
(0025906)
rafaroda   
2010-04-06 17:16   
I experienced the same issue:
* Created a new module with DBPREFIX: MYMOD
* Added a foreign key to a base module (core o another module) with name EM_MYMOD_COLUMNNAME
* Added a constraint for this foreign key with name EM_MYMOD_CONSTRAINTNAME
* export.database with my new module in development: OK
* export.database with the base module (core or another module) in development: KO, Warnings for Validation type: NOT_PART_OF_FOREIGN_KEY message is displayed.
(0026186)
rafaroda   
2010-04-14 15:22   
This specially annoying when you add external column to core tables such as C_ORDER and M_PRODUCT table since you get the following error messages that create a big alarm without reason:

[exportdatabase] Foreign Key Column C_ORDER.AD_Client_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.AD_Org_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_DocType_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_DocTypeTarget_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.SalesRep_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_BPartner_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.BillTo_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_BPartner_Location_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_Currency_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_PaymentTerm_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.M_Shipper_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_Charge_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.M_Warehouse_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.M_PriceList_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_Campaign_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_Project_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_Activity_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.AD_User_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.DropShip_BPartner_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.DropShip_Location_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.DropShip_User_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.AD_OrgTrx_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.C_Incoterms_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column C_ORDER.Delivery_Location_ID is not part of a foreign key constraint.

[exportdatabase] Foreign Key Column M_PRODUCT.AD_Client_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.AD_Org_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.C_UOM_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.SalesRep_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.M_Product_Category_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.C_TaxCategory_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.S_Resource_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.S_ExpenseType_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.M_AttributeSet_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.M_AttributeSetInstance_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.M_FreightCategory_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.M_Locator_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.AD_Image_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.C_BPartner_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.MA_Processplan_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.MRP_Planner_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column M_PRODUCT.MRP_Planningmethod_ID is not part of a foreign key constraint.
(0031298)
rafaroda   
2010-09-22 15:51   
Keeps reproducing in openbravo ERP 2.50 MP21

[exportdatabase] +++++++++++++++++++++++++++++++++++++++++++++++++++
[exportdatabase] Warnings for Validation type: NOT_PART_OF_FOREIGN_KEY
[exportdatabase] +++++++++++++++++++++++++++++++++++++++++++++++++++
[exportdatabase] Foreign Key Column EVEBUCO_BUDGET.AD_Client_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column EVEBUCO_BUDGET.AD_Org_ID is not part of a foreign key constraint.
[exportdatabase] Foreign Key Column EVEBUCO_BUDGET.C_Year_ID is not part of a foreign key constraint.
(0038981)
hgbot   
2011-07-11 16:13   
Repository: erp/devel/pi
Changeset: ec2f20c12634f769388bf60f8b6e54f88e5a9e38
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Jul 11 16:11:50 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ec2f20c12634f769388bf60f8b6e54f88e5a9e38 [^]

Fixed issue 11137. Validation for foreign keys will now be correct.

---
M src/org/openbravo/service/system/DatabaseValidator.java
---
(0039063)
shuehner   
2011-07-14 15:53   
Reviewed/tested on pi/pgsql (rev: 2de13e5d42cf). Review: code-change fine restricting validation to the properties really present in the module which is being currently validated. Testing on pi: 'usual' wrong fk-warnings are no longer shown. introducing error still triggers validation warning both when using 'model/tables' and /model/modifiedTables' in a module.
(0039582)
hudsonbot   
2011-08-01 14:19   
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/cf2afed6e8ef [^]

Maturity status: Test