Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0041142 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [Modules] SAP Connector | major | always | 2019-06-20 18:24 | 2022-02-01 08:05 | |||||||
Reporter | martinsdan | View Status | public | |||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Mac OS | Database | PostgreSQL | Java version | 1.7 | |||||||
OS Version | 10.12 | Database version | 9.5 | Ant version | 1.9.4 | |||||||
Product Version | SCM revision | |||||||||||
Regression date | ||||||||||||
Regression introduced by commit | ||||||||||||
Regression level | ||||||||||||
Review Assigned To | ||||||||||||
Regression introduced in release | ||||||||||||
Summary | 0041142: Problem creating several mappings for the same iDoc | |||||||||||
Description | We need to sync several transactions like shipments and distribution orders for example. In this case, we have a problem because we want to map 2 Openbravo entities with the same idoc. In this case, we should have 2 Mapping entries with the same External Entity but a different Openbravo Entity. Everything seems ok when generating the idoc, but an error is thrown when getting the path to save the idoc. org.openbravo.service.integration.sapecc.process.SapEccExporterSynchronizableBusinessObjectExporter.java String fileName = getFilePath(idocType); This will eventually call: org.openbravo.service.integration.sapecc.process.SapEccExporterSynchronizableBusinessObjectExporter.java private EntityMapping getEntityMapping(String idocType) { OBCriteria<EntityMapping> criteria = OBDal.getInstance().createCriteria(EntityMapping.class); criteria.add(Restrictions.eq(EntityMapping.PROPERTY_SYSTEMTYPE, SapEccConstants.SYSTEM_TYPE)); criteria.add(Restrictions.eq(EntityMapping.PROPERTY_MAPPEDENTITY, idocType)); criteria.add(Restrictions.eq(EntityMapping.PROPERTY_INTEGRATIONDIRECTION, IntegrationDirection.EXPORT_FROM_OB.getLabel())); criteria.setFilterOnReadableClients(false); criteria.setFilterOnReadableOrganization(false); return (EntityMapping) criteria.uniqueResult(); } Here is the problem, this will throw an error because the query returns 2 results. org.hibernate.NonUniqueResultException: query did not return a unique result: 2 | |||||||||||
Steps To Reproduce | We need to create 2 mappings to export the same idoc. | |||||||||||
Proposed Solution | I think we should get this information somehow from the context we are executing the process because it should be possible to have several combinations for the same idoc and entity and schedule the selected implementation. A proposed solution patch is attached. | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | noUniqueError.diff [^] (4,327 bytes) 2019-06-20 18:24 [Show Content] | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Issue History | |||
Date Modified | Username | Field | Change |
2019-06-20 18:24 | martinsdan | New Issue | |
2019-06-20 18:24 | martinsdan | Assigned To | => platform |
2019-06-20 18:24 | martinsdan | File Added: noUniqueError.diff | |
2022-02-01 08:05 | alostale | Assigned To | platform => Triage Platform Base |
Copyright © 2000 - 2009 MantisBT Group |