Openbravo Issue Tracking System - Modules
View Issue Details
0044433ModulesExternal Integration Infrastructurepublic2020-06-19 17:052020-07-03 19:18
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
 
AugustoMauch
0044433: A property mapping based on a multi path can't be used as identifies record univocally
A property mapping based on a on a multi path (ex: businessPartner.name) property can't be used as identifies record univocally
1- Install the org.openbravo.service.external.integration.tests
2- Apply the attached patch. It provides a new entity mapping definition that has two properties based in a multipath (user.name and role.name) having both with the "identifies record univocally flag" enabled
3- Run the test. It will fail with the following error: org.hibernate.QueryException: could not resolve property
No tags attached.
diff issue44433.test.diff (10,343) 2020-06-25 10:18
https://issues.openbravo.com/file_download.php?file_id=14688&type=bug
Issue History
2020-06-19 17:05caristuNew Issue
2020-06-19 17:05caristuAssigned To => caristu
2020-06-22 09:53javietxeIssue Monitored: javietxe
2020-06-25 10:05caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21229#r21229
2020-06-25 10:05caristuReview Assigned To => AugustoMauch
2020-06-25 10:18caristuFile Added: issue44433.test.diff
2020-06-25 10:18caristuNote Added: 0121057
2020-07-03 18:43hgbotCheckin
2020-07-03 18:43hgbotNote Added: 0121255
2020-07-03 18:43hgbotStatusnew => resolved
2020-07-03 18:43hgbotResolutionopen => fixed
2020-07-03 18:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/2150ee683e826820de999aed5982248eb7092479 [^]
2020-07-03 19:17hgbotCheckin
2020-07-03 19:17hgbotNote Added: 0121256
2020-07-03 19:18caristuStatusresolved => closed

Notes
(0121057)
caristu   
2020-06-25 10:18   
MR: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/merge_requests/2/ [^]
(0121255)
hgbot   
2020-07-03 18:43   
Repository: erp/pmods/org.openbravo.service.external.integration
Changeset: 2150ee683e826820de999aed5982248eb7092479
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jun 25 10:09:56 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/2150ee683e826820de999aed5982248eb7092479 [^]

Fixes BUG-44433: A multi path property can't be used as record identifier

  Refactoring logic that handles "Identifies Record Univocally" feature
to make use of an OBQuery instead of an OBCriteria. Thus we can use
multipath properties to find whether the record exists or not.

---
M src/org/openbravo/service/external/integration/importer/DalSynchronizableBusinessObjectImporter.java
---
(0121256)
hgbot   
2020-07-03 19:17   
Repository: erp/pmods/org.openbravo.service.external.integration.tests
Changeset: 172a0de144d898fb42cf75f7f7de28b3382424e8
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Jul 03 19:17:35 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration.tests/rev/172a0de144d898fb42cf75f7f7de28b3382424e8 [^]

Related to BUG-44433: Add test case

---
M src-db/database/sourcedata/OBEI_ENTITY_MAPPING.xml
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
M src-test/org/openbravo/service/external/integration/test/TestConstants.java
A src-test/org/openbravo/service/external/integration/test/_import/UserRolesImportTest.java
---