Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042419Openbravo ERPA. Platformpublic2019-11-27 14:332020-01-20 09:11
shuehner 
cberner 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
AugustoMauch
Core
No
0042419: Error about non-existing table on each install.source in pg logfile (related to obsolete table recreation in dbsm)
On each install.source the following error can be found in postgresql.log

2019-11-27 14:16:08.486 CET [11876] tadpi_pg12_pg@obpi_pg12_pg ERROR: relation "m_requisitionline_" does not exist at character 33
2019-11-27 14:16:08.486 CET [11876] tadpi_pg12_pg@obpi_pg12_pg STATEMENT: SELECT (SELECT DATEPLANNED FROM M_REQUISITIONLINE_ WHERE M_REQUISITIONLINE_.M_REQUISITIONLINE_ID = M_REQUISITIONLINE.M_REQUISITIONLINE_ID) FROM M_REQUISITIONLINE LIMIT 1

Technically that some from an onCreateDefault clause on the table definition:
database/model/tables/M_REQUISITIONLINE.xml: <onCreateDefault><![CDATA[SELECT DATEPLANNED FROM M_REQUISITIONLINE_ WHERE M_REQUISITIONLINE_.M_REQUISITIONLINE_ID = M_REQUISITIONLINE.M_REQUISITIONLINE_ID]]></onCreateDefault>

Technical error comes from the fact that the clause is reading from a M_REQUISITIONLINE_ table which is a intermediate table which was several years ago by update.database when modifying tables.

However that 'table recreation' is not done anymore for some years (except very special cases) so probably the onCreateDefault clause does not even provide value today.


Check postgresql log file after any install.source for above error.
No tags attached.
Issue History
2019-11-27 14:33shuehnerNew Issue
2019-11-27 14:33shuehnerAssigned To => platform
2019-11-27 14:33shuehnerModules => Core
2019-11-27 14:33shuehnerTriggers an Emergency Pack => No
2019-12-26 11:42AugustoMauchNote Added: 0116532
2019-12-26 11:43AugustoMauchAssigned Toplatform => cberner
2019-12-30 16:28cbernerStatusnew => scheduled
2019-12-30 16:28cbernerReview Assigned To => AugustoMauch
2019-12-30 16:36cbernerNote Added: 0116577
2020-01-13 09:42hgbotCheckin
2020-01-13 09:42hgbotNote Added: 0116782
2020-01-13 09:42hgbotStatusscheduled => resolved
2020-01-13 09:42hgbotResolutionopen => fixed
2020-01-13 09:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bff30b62883c6fc9089d0ea30d34d6c7f493fa53 [^]
2020-01-20 09:11AugustoMauchNote Added: 0117051
2020-01-20 09:11AugustoMauchStatusresolved => closed
2020-01-20 09:11AugustoMauchFixed in Version => 3.0PR20Q2

Notes
(0116532)
AugustoMauch   
2019-12-26 11:42   
This is the changeset where the onCreateDefault was introduced:

https://gitlab.com/openbravo/product/openbravo/commit/3d193630bc9a2e62deeee8a445792b0c3338ee2e [^]
(0116577)
cberner   
2019-12-30 16:36   
Being tracked in this merge request: https://gitlab.com/openbravo/product/openbravo/merge_requests/28 [^]
(0116782)
hgbot   
2020-01-13 09:42   
Repository: erp/devel/pi
Changeset: bff30b62883c6fc9089d0ea30d34d6c7f493fa53
Author: Cristian Berner <cristian.berner <at> openbravo.com>
Date: Thu Dec 26 16:36:15 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/bff30b62883c6fc9089d0ea30d34d6c7f493fa53 [^]

Fixes BUG-42419: Remove onDefaultCreate clause referencing intermediate table

---
M src-db/database/model/tables/M_REQUISITIONLINE.xml
---
(0117051)
AugustoMauch   
2020-01-20 09:11   
Code reviewed and verified