Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032310Openbravo ERPA. Platformpublic2016-02-23 10:552016-02-24 17:32
alostale 
alostale 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR15Q4.43.0PR15Q4.4 
caristu
Core
Production - QA Approved
2015-07-03
3.0PR15Q4
https://code.openbravo.com/erp/devel/pi/rev/b26a24d2053e04743e90c430dc6f14098348651b [^]
No
0032310: error on update if entity persistence observer loaded current object in memory
If an entity persistence observer loas current object in memory, an error is thrown when trying to perform an update from UI.
-Add to attached OrderLineObserver.java to sources and compile
-Try to edit any existent order line.
  -> The following error can be seen:
    Saving failed. a different object with the same identifier value was already associated with the session: [OrderLine#7517250EF33F451CAF1CFF9A1CA5FEC9]
No tags attached.
blocks defect 0032308 closed alostale error on update if entity persistence observer loaded current object in memory 
Issue History
2016-02-23 10:58alostaleTypedefect => backport
2016-02-23 10:58alostaleTarget Version => 3.0PR15Q4.4
2016-02-24 15:05alostaleReview Assigned To => caristu
2016-02-24 15:22hgbotCheckin
2016-02-24 15:22hgbotNote Added: 0084464
2016-02-24 15:22hgbotStatusscheduled => resolved
2016-02-24 15:22hgbotResolutionopen => fixed
2016-02-24 15:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q4.4/rev/0d5aa309a887199363869c0a1b890d19c3b00eb9 [^]
2016-02-24 17:32caristuNote Added: 0084471
2016-02-24 17:32caristuStatusresolved => closed
2016-02-24 17:32caristuFixed in Version => 3.0PR15Q4.4

Notes
(0084464)
hgbot   
2016-02-24 15:22   
Repository: erp/backports/3.0PR15Q4.4
Changeset: 0d5aa309a887199363869c0a1b890d19c3b00eb9
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 23 16:37:30 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4.4/rev/0d5aa309a887199363869c0a1b890d19c3b00eb9 [^]

fixed bug 32310: error on update if an observer loaded current object in memory

  In case an entity observer loaded current object in memory (ie. observing orderLine)
  doing orderLine.getSalesOrder().getOrderLineList() there were two different instances
  in memory representing the same DB row. This caused problems when trying to evict it.
  Causing an exception to be thrown when updating from UI in this case.

  As solution eviction is no longer performed, object is forced to be fetched from DB by
  executing a Criteria.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
---
(0084471)
caristu   
2016-02-24 17:32   
Code review + testing OK