Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | |||||||||||
0045922 | |||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
design defect | [Openbravo ERP] A. Platform | major | have not tried | 2021-02-18 18:04 | 2022-02-01 08:07 | ||||||
Reporter | ALopetegui | View Status | public | ||||||||
Assigned To | Triage Platform Base | ||||||||||
Priority | normal | Resolution | open | Fixed in Version | |||||||
Status | acknowledged | Fix in branch | Fixed in SCM revision | ||||||||
Projection | none | ETA | none | Target Version | |||||||
OS | Any | Database | Any | Java version | |||||||
OS Version | Database version | Ant version | |||||||||
Product Version | PR20Q3.1 | SCM revision | |||||||||
Review Assigned To | |||||||||||
Web browser | |||||||||||
Modules | Core | ||||||||||
Regression level | |||||||||||
Regression date | |||||||||||
Regression introduced in release | |||||||||||
Regression introduced by commit | |||||||||||
Triggers an Emergency Pack | No | ||||||||||
Summary | 0045922: Extra self-join with main table when using computed columns | ||||||||||
Description | Adding new hql properties with computed columns, there is an extra join with the main table instead of using the existing one. | ||||||||||
Steps To Reproduce | Add a new hql property to master product for example, the query of search product will add an extra join with m_product to use the computed column. | ||||||||||
Proposed Solution | It seems a bug or design defect of hibernate , the way hql makes the query with computed columns. | ||||||||||
Tags | NOR, Performance | ||||||||||
Attached Files | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Notes | |
(0126272) shuehner (administrator) 2021-02-22 15:01 |
There is known cases (fixes several times) that this happens if the HQL of the columns is written poorly. Typical cases: - Either adding new from clause for main table again - 2nd referencing to main table pk via "= object" and not ".id = object.id" which avoids the extra self-join. Adding as a note as unclear if your concrete case if just +1 of that known topic or a seperate unavoidable one. |
(0126393) alostale (manager) 2021-03-01 07:23 edited on: 2021-03-01 10:13 |
This issue seems to be caused by Hibernate issue HHH-12895, which is fixed in Hibernate 5.4.10. Moving it to DD as it depends on Hibernate update 0045968 https://hibernate.atlassian.net/browse/HHH-12895 [^] |
(0131408) shuehner (administrator) 2021-08-27 15:35 |
To reproduce the following module can be used (to add column triggering the behavior): org.openbravo.france.ecotax (adding columns) org.openbravo.retail.france.ecotax (adding usage in ProductProperties) |
(0131409) cberner (developer) 2021-08-27 15:45 |
This issue is still reproducible after updating hibernate to 5.5.6, so I think the hibernate issue mentioned is not the problem here. https://hibernate.atlassian.net/browse/HHH-12895 [^] |
(0131952) alostale (manager) 2021-09-21 13:34 |
It is reported as a new Hibernate issue [1], but most probably it won't be fixed till 6.x [2]. [1] https://hibernate.atlassian.net/browse/HHH-14830 [^] [2] https://discourse.hibernate.org/t/extra-cross-join-created-when-using-one-to-one-or-many-to-one-same-table-entity/5723 [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2021-02-18 18:04 | ALopetegui | New Issue | |
2021-02-18 18:04 | ALopetegui | Assigned To | => platform |
2021-02-18 18:04 | ALopetegui | Modules | => Core |
2021-02-18 18:04 | ALopetegui | Resolution time | => 1617400800 |
2021-02-18 18:04 | ALopetegui | Triggers an Emergency Pack | => No |
2021-02-18 18:05 | ALopetegui | Tag Attached: Performance | |
2021-02-18 18:16 | ALopetegui | Steps to Reproduce Updated | View Revisions |
2021-02-22 10:44 | rafaroda | Tag Attached: NOR | |
2021-02-22 10:46 | rafaroda | Relationship added | related to 0045919 |
2021-02-22 10:47 | rafaroda | Relationship added | related to 0044911 |
2021-02-22 10:47 | rafaroda | Relationship added | related to 0045055 |
2021-02-22 10:47 | rafaroda | Relationship added | related to 0045144 |
2021-02-22 10:48 | rafaroda | Relationship added | related to 0045467 |
2021-02-22 15:01 | shuehner | Note Added: 0126272 | |
2021-02-22 15:02 | shuehner | Issue Monitored: shuehner | |
2021-02-24 09:53 | rafaroda | Resolution time | 1617400800 => 1614726000 |
2021-03-01 07:23 | alostale | Note Added: 0126393 | |
2021-03-01 07:24 | alostale | Resolution time | 1614726000 => |
2021-03-01 07:24 | alostale | Type | defect => design defect |
2021-03-01 10:12 | alostale | Relationship added | depends on 0045968 |
2021-03-01 10:13 | alostale | Note Edited: 0126393 | View Revisions |
2021-03-04 12:55 | rafaroda | Relationship added | related to 0045056 |
2021-08-27 15:35 | shuehner | Note Added: 0131408 | |
2021-08-27 15:45 | cberner | Note Added: 0131409 | |
2021-09-21 13:30 | alostale | Relationship added | depends on 0045969 |
2021-09-21 13:31 | alostale | Status | new => acknowledged |
2021-09-21 13:34 | alostale | Note Added: 0131952 | |
2021-09-21 13:35 | alostale | Relationship deleted | depends on 0045968 |
2022-02-01 08:07 | alostale | Assigned To | platform => Triage Platform Base |
Copyright © 2000 - 2009 MantisBT Group |