Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037708Openbravo ERPA. Platformpublic2018-01-23 18:502022-02-01 08:08
aferraz 
Triage Platform Base 
normalminorhave not tried
acknowledgedopen 
5
 
 
Core
No
0037708: Update of Order table not working in HQL
If we try to run an update query in Order table using HQL, following error is raised: java.lang.IllegalArgumentException: node to traverse cannot be null!
Create following HQL query:
Query updateQry = OBDal.getInstance().getSession().createQuery("update Order set description = 'a'");

You get following error:
java.lang.IllegalArgumentException: node to traverse cannot be null!

If we create the same query for Invoice table instead of Order table, query is correctly created:
Query updateQry = OBDal.getInstance().getSession().createQuery("update Invoice set description = 'a'");

It seems that Hibernate is confusing Order table name with order by keyword.
No tags attached.
related to defect 0028330 closed reinaldoguerra "java.lang.IllegalArgumentException: node to traverse cannot be null!" error when executing Reset Accounting 
related to defect 00281633.0PR15Q1 closed reinaldoguerra "java.lang.IllegalArgumentException: node to traverse cannot be null!" error when trying to Unpost an Order 
Issue History
2018-01-23 18:50aferrazNew Issue
2018-01-23 18:50aferrazAssigned To => platform
2018-01-23 18:50aferrazModules => Core
2018-01-23 18:50aferrazTriggers an Emergency Pack => No
2018-01-23 18:51aferrazRelationship addedrelated to 0028330
2018-01-23 18:52aferrazRelationship addedrelated to 0028163
2018-01-23 18:53aferrazDescription Updatedbug_revision_view_page.php?rev_id=16576#r16576
2018-01-23 18:53aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16578#r16578
2018-01-23 18:56aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16579#r16579
2018-02-09 09:27alostaleNote Added: 0102292
2018-02-09 09:27alostaleStatusnew => acknowledged
2018-02-09 09:27alostaleTypedefect => design defect
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

Notes
(0102292)
alostale   
2018-02-09 09:27   
Moving to design defect, as this seems to be a Hibernate restriction [1].

[1] https://stackoverflow.com/questions/3599803/jpa-hibernate-cant-create-entity-called-order [^]