Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2013-09-14 09:322013-09-17 19:03
ReportershuehnerView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0MP28
StatusclosedFix in branchFixed in SCM revision39da19e84a24
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toshankarb
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0024771: Broken/useless onCreateDefault statement

DescriptionThere are quite a few identical onCreateDefault statements which are (now) broken and no longer useful.

As those always fail and create errors in log on the execution they should be removed.

ERROR: more than one row returned by a subquery used as an expression

Those are onCreateDefault constraints which are adding the 'ad_module_id' values to AD-tables on upgrade of 2.40 (which did not have modules) to 2.50.

In that upgrade all custom rows (which would need a module id generated) were placed into a customization module so there was exactly one module <> '0' in that upgrade so this sql code the value.

However now in pi first ad_module_id is mandatory and always filled + also there are always more module so that subselect can only fail with as it does not produce only a single value.

As upgrades from 2.40 to pi need to go always via 2.50 it should be fine to remove those onCreateDefaults in pi (and pi only) as there we are garanteed to always have those ad_module_id's filled and also if not those onCreateDefault would never work.
Steps To ReproduceCheck postgresql.log on any update.database for errors related to t
Proposed SolutionRemove the onCreateDefault values on pi as they cannot work.
TagsNo tags attached.
Attached Filesdiff file icon 24771.diff [^] (22,718 bytes) 2013-09-14 10:27 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
hgbot (developer)
2013-09-16 15:18

Repository: erp/devel/pi
Changeset: 39da19e84a241426a1de3fe6e1f1be67ee2aca3b
Author: Augusto Mauch <augusto.mauch <at>>
Date: Mon Sep 16 10:28:03 2013 +0200
URL: [^]

Fixes issue 24771: Removed broken onCreateDefault statements

The removed onCreateDefault statements only had sense when used to upgrade Openbravo from 2.40 to 2.50. They are not needed because in order to upgrade form 2.40 to pi, the user needs to previously upgrade to 2.50.

M modules/org.openbravo.client.kernel/src-db/database/model/tables/OBCLKER_TEMPLATE.xml
M modules/org.openbravo.service.datasource/src-db/database/model/tables/OBSERDS_DATASOURCE.xml
M modules/org.openbravo.userinterface.selector/src-db/database/model/tables/OBUISEL_SELECTOR_FIELD.xml
M src-db/database/model/tables/AD_AUXILIARINPUT.xml
M src-db/database/model/tables/AD_CALLOUT.xml
M src-db/database/model/tables/AD_CLIENTMODULE.xml
M src-db/database/model/tables/AD_COLUMN.xml
M src-db/database/model/tables/AD_DATASET.xml
M src-db/database/model/tables/AD_DATASET_COLUMN.xml
M src-db/database/model/tables/AD_DATASET_TABLE.xml
M src-db/database/model/tables/AD_ELEMENT.xml
M src-db/database/model/tables/AD_FIELD.xml
M src-db/database/model/tables/AD_FIELDGROUP.xml
M src-db/database/model/tables/AD_FORM.xml
M src-db/database/model/tables/AD_MENU.xml
M src-db/database/model/tables/AD_MESSAGE.xml
M src-db/database/model/tables/AD_MODULE_DBPREFIX.xml
M src-db/database/model/tables/AD_MODULE_DEPENDENCY.xml
M src-db/database/model/tables/AD_MODULE_LOG.xml
M src-db/database/model/tables/AD_MODULE_TRL.xml
M src-db/database/model/tables/AD_ORGMODULE.xml
M src-db/database/model/tables/AD_PACKAGE.xml
M src-db/database/model/tables/AD_PROCESS.xml
M src-db/database/model/tables/AD_REFERENCE.xml
M src-db/database/model/tables/AD_REF_DATA_LOADED.xml
M src-db/database/model/tables/AD_REF_LIST.xml
M src-db/database/model/tables/AD_TAB.xml
M src-db/database/model/tables/AD_TABLE.xml
M src-db/database/model/tables/AD_TEXTINTERFACES.xml
M src-db/database/model/tables/AD_VAL_RULE.xml
M src-db/database/model/tables/AD_WINDOW.xml
shankarb (developer)
2013-09-17 09:08

Code reviewed and verified in pi changeset a549285cc9f0
hudsonbot (developer)
2013-09-17 19:03

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2013-09-14 09:32 shuehner New Issue
2013-09-14 09:32 shuehner Assigned To => AugustoMauch
2013-09-14 09:32 shuehner Modules => Core
2013-09-14 09:32 shuehner Triggers an Emergency Pack => No
2013-09-14 10:27 shuehner File Added: 24771.diff
2013-09-16 10:28 AugustoMauch Issue Monitored: shankarb
2013-09-16 10:28 AugustoMauch Review Assigned To => shankarb
2013-09-16 15:18 hgbot Checkin
2013-09-16 15:18 hgbot Note Added: 0061173
2013-09-16 15:18 hgbot Status new => resolved
2013-09-16 15:18 hgbot Resolution open => fixed
2013-09-16 15:18 hgbot Fixed in SCM revision => [^]
2013-09-17 09:08 shankarb Note Added: 0061188
2013-09-17 09:08 shankarb Status resolved => closed
2013-09-17 09:08 shankarb Fixed in Version => 3.0MP28
2013-09-17 19:03 hudsonbot Checkin
2013-09-17 19:03 hudsonbot Note Added: 0061256

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker