Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038250
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2018-03-28 16:432018-04-26 15:37
ReportershuehnerView Statuspublic 
Assigned ToSandrahuguet 
PrioritynormalResolutionfixedFixed in VersionRR18Q3
StatusclosedFix in branchFixed in SCM revision156ba6e63e82
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038250: Query in Context servlet (aka org.openbravo.mobile.core.context) has extra join which is not needed.

DescriptionHQL Query inside that class:

    String hqlUser = "select u as user, r as role, org as organization, cli as client "
        + "from ADUser u left outer join u.businessPartner bp, ADRole r, Organization org, ADClient cli "
        + "where u.id = :userId " + " and u.active = true " + " and r.id = :roleId "
        + " and org.id = :orgId " + " and cli.id = :clientId ";

Does an extra left outer join to u.businessPartner (c_bpartner table) with alias bp.
That alias then is never used in output or other parts of the query so should be removed.

As that is left outer join pointing to primary key of c_bpartner table removing the join will not change number of rows in result either.
Steps To Reproduce-
Proposed SolutionDelete the extra not needed join
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0103658)
hgbot (developer)
2018-04-04 08:33

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 156ba6e63e82074aed1959b0ad610e849eb3a275
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Apr 03 09:10:27 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/156ba6e63e82074aed1959b0ad610e849eb3a275 [^]

Fixed issue 38250 delete unneded extra join

---
M src/org/openbravo/mobile/core/login/Context.java
---

- Issue History
Date Modified Username Field Change
2018-03-28 16:43 shuehner New Issue
2018-03-28 16:43 shuehner Assigned To => Sandrahuguet
2018-03-28 16:43 shuehner Triggers an Emergency Pack => No
2018-03-28 16:44 shuehner Tag Attached: Performance
2018-04-04 08:33 hgbot Checkin
2018-04-04 08:33 hgbot Note Added: 0103658
2018-04-04 08:33 hgbot Status new => resolved
2018-04-04 08:33 hgbot Resolution open => fixed
2018-04-04 08:33 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/156ba6e63e82074aed1959b0ad610e849eb3a275 [^]
2018-04-04 08:34 Sandrahuguet Review Assigned To => marvintm
2018-04-04 08:34 Sandrahuguet Fixed in Version => RR18Q3
2018-04-26 15:37 marvintm Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker