Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0024495 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | critical | N/A | 2013-08-07 09:35 | 2013-08-09 08:45 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 3.0MP27 | |||
Status | closed | Fix in branch | Fixed in SCM revision | f9a212cc9d22 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | 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 | 0024495: Lazy computed columns API chage | |||||||
Description | Fix for issue 0024104 makes computed columns to be lazily calculated. As part of this fix, generated code for DAL entities has renamed properties for computed columns in order to prevent accidental filtering by them which would cause performance issues. NOTE: Computed columns cannot be used as part of Criterias anymore. The properties for computed columns present in core that have been removed are (see http://builds.openbravo.com/view/try/job/try-api/1527/console [^]): org.openbravo.model.common.order: Missing field org.openbravo.model.common.order.Order.PROPERTY_DELIVERYSTATUS: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 field org.openbravo.model.common.order.Order.PROPERTY_INVOICESTATUS: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 org.openbravo.model.financialmgmt.calendar: Missing field org.openbravo.model.financialmgmt.calendar.Period.PROPERTY_STATUS: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 org.openbravo.model.financialmgmt.payment: Missing field org.openbravo.model.financialmgmt.payment.DoubtfulDebt.PROPERTY_OUTSTANDINGDOUBTFULDEBTAMOUNT: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 field org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount.PROPERTY_LASTRECONBALANCE: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 field org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount.PROPERTY_LASTRECONCILIATION: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 field org.openbravo.model.financialmgmt.payment.FIN_PaymentProposal.PROPERTY_LIMITWRITEOFF: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 field org.openbravo.model.financialmgmt.payment.FIN_PaymentSchedule.PROPERTY_DAYSOVERDUE: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 field org.openbravo.model.financialmgmt.payment.FIN_PaymentSchedule.PROPERTY_LASTPAYMENTDATE: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 field org.openbravo.model.financialmgmt.payment.FIN_PaymentSchedule.PROPERTY_NUMBEROFPAYMENTS: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 field org.openbravo.model.financialmgmt.payment.FIN_PaymentSchedule.PROPERTY_TOTALDEBTAMOUNT: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 org.openbravo.model.manufacturing.transaction: Missing field org.openbravo.model.manufacturing.transaction.WorkRequirement.PROPERTY_CLOSEDSTAT: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 org.openbravo.model.materialmgmt.transaction: Missing field org.openbravo.model.materialmgmt.transaction.ShipmentInOut.PROPERTY_INVOICESTATUS: missing in /srv/hudson/workspace/try-full-oracle/SANDBOX/api-checks/output/1527 + failure=1 It also changes the way computed columns can be queried using HQL. In case computed columns are needed to be accessed from HQL, they are not directly available but through the _computedColumns property. As example, this HQL: from Order o where o.deliveredStatus = 100 should be rewritten to: from Order o where o._computedColumns.deliveredStatus = 100 Note this kind of queries should be reviewed not only because of the API change but also because they can cause performance problems. The naming of computed columns properties in generated code code be preserved to the old one not making an API change, but this is not the case for HQL. Also code making use of these proeprties should be reviewed because it is potentially harmful in terms of performance. This is the reason this API change in the generated code has been intentionally introduced. | |||||||
Steps To Reproduce | - | |||||||
Proposed Solution | Even the risk of this API change is potentially high, the proposal is to accept it because it is intended to improve performance. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||
|
Notes | |
(0060547) dmitry_mezentsev (developer) 2013-08-08 17:41 |
Accepted. The change is risky but the impact should be low as in Openbravo distribution we did not find any above mentioned use of calculated fields. There is one use-case in Retail which is wrong anyway. |
(0060549) hgbot (developer) 2013-08-09 08:35 |
Repository: erp/devel/api-checks Changeset: f9a212cc9d224d817a376cb8dd1fd3247b6501c4 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Aug 09 08:34:51 2013 +0200 URL: http://code.openbravo.com/erp/devel/api-checks/rev/f9a212cc9d224d817a376cb8dd1fd3247b6501c4 [^] fixed issue 24495: Lazy computed columns API chage --- M java/reference/java.japi.gz --- |
(0060550) alostale (manager) 2013-08-09 08:45 |
see documentation: http://wiki.openbravo.com/wiki/How_to_create_a_Computed_Column#Limitations [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2013-08-07 09:35 | alostale | New Issue | |
2013-08-07 09:35 | alostale | Assigned To | => dmitry_mezentsev |
2013-08-07 09:35 | alostale | Modules | => Core |
2013-08-07 09:35 | alostale | Triggers an Emergency Pack | => No |
2013-08-07 09:42 | alostale | Proposed Solution updated | |
2013-08-07 09:42 | alostale | Relationship added | depends on 0024104 |
2013-08-07 14:27 | alostale | Description Updated | View Revisions |
2013-08-08 17:41 | dmitry_mezentsev | Note Added: 0060547 | |
2013-08-08 17:41 | dmitry_mezentsev | Assigned To | dmitry_mezentsev => alostale |
2013-08-08 17:46 | alostale | Relationship added | related to 0024516 |
2013-08-09 08:35 | hgbot | Checkin | |
2013-08-09 08:35 | hgbot | Note Added: 0060549 | |
2013-08-09 08:35 | hgbot | Status | new => resolved |
2013-08-09 08:35 | hgbot | Resolution | open => fixed |
2013-08-09 08:35 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/api-checks/rev/f9a212cc9d224d817a376cb8dd1fd3247b6501c4 [^] |
2013-08-09 08:45 | alostale | Note Added: 0060550 | |
2013-08-09 08:45 | alostale | Status | resolved => closed |
2013-08-09 08:45 | alostale | Fixed in Version | => 3.0MP27 |
2014-04-29 11:47 | caristu | Relationship added | related to 0026412 |
Copyright © 2000 - 2009 MantisBT Group |