Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032308Openbravo ERPA. Platformpublic2016-02-23 10:552016-03-17 10:56
alostale 
alostale 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR16Q2 
caristu
Core
Production - QA Approved
2015-07-03
3.0PR15Q4
https://code.openbravo.com/erp/devel/pi/rev/b26a24d2053e04743e90c430dc6f14098348651b [^]
No
0032308: 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.
depends on backport 00323093.0PR16Q1 closed alostale error on update if entity persistence observer loaded current object in memory 
depends on backport 00323103.0PR15Q4.4 closed alostale error on update if entity persistence observer loaded current object in memory 
caused by defect 00303083.0PR15Q4 closed caristu Use get instead of refresh when saving or updating a record 
related to defect 0035060 closed alostale EntityPersistanceEventObservers are executed twice on commitAndClose 
? OrderLineObserver.java (984) 2016-02-23 11:08
https://issues.openbravo.com/file_download.php?file_id=9089&type=bug
Issue History
2016-02-23 10:55alostaleNew Issue
2016-02-23 10:55alostaleAssigned To => platform
2016-02-23 10:55alostaleModules => Core
2016-02-23 10:55alostaleTriggers an Emergency Pack => No
2016-02-23 10:57alostaleRegression level => Production - QA Approved
2016-02-23 10:57alostaleRegression date => 2015-07-03
2016-02-23 10:57alostaleRegression introduced in release => 3.0PR15Q4
2016-02-23 10:57alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/b26a24d2053e04743e90c430dc6f14098348651b [^]
2016-02-23 10:57alostaleAssigned Toplatform => alostale
2016-02-23 10:58alostaleRelationship addedcaused by 0030308
2016-02-23 10:58alostaleStatusnew => scheduled
2016-02-23 11:08alostaleFile Added: OrderLineObserver.java
2016-02-24 15:02alostaleReview Assigned To => caristu
2016-02-24 15:03hgbotCheckin
2016-02-24 15:03hgbotNote Added: 0084462
2016-02-24 15:03hgbotCheckin
2016-02-24 15:03hgbotNote Added: 0084463
2016-02-24 15:03hgbotStatusscheduled => resolved
2016-02-24 15:03hgbotResolutionopen => fixed
2016-02-24 15:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/64dcdb9cf68b85655f7f634657eef6b685092cb5 [^]
2016-02-24 17:31caristuNote Added: 0084470
2016-02-24 17:31caristuStatusresolved => closed
2016-02-24 17:31caristuFixed in Version => 3.0PR16Q2
2016-03-17 10:56hudsonbotCheckin
2016-03-17 10:56hudsonbotNote Added: 0085164
2016-03-17 10:56hudsonbotCheckin
2016-03-17 10:56hudsonbotNote Added: 0085165
2017-01-26 14:17alostaleRelationship addedrelated to 0035060

Notes
(0084462)
hgbot   
2016-02-24 15:03   
Repository: erp/devel/pi
Changeset: ea854655f9aa2e204bc2d7d51ead6364ea9c8e4f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 23 16:38:23 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ea854655f9aa2e204bc2d7d51ead6364ea9c8e4f [^]

related to bug 32308: added test cases covering observers with ds update

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
A modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/DatasourceEventObserver.java
A modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/OrderLineTestObserver.java
---
(0084463)
hgbot   
2016-02-24 15:03   
Repository: erp/devel/pi
Changeset: 64dcdb9cf68b85655f7f634657eef6b685092cb5
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 23 16:37:30 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/64dcdb9cf68b85655f7f634657eef6b685092cb5 [^]

fixed bug 32308: 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
M src/org/openbravo/base/structure/BaseOBObject.java
---
(0084470)
caristu   
2016-02-24 17:31   
Code review + testing OK
(0085164)
hudsonbot   
2016-03-17 10:56   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test
(0085165)
hudsonbot   
2016-03-17 10:56   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test