Details
-
Bug
-
Resolution: Done
-
Blocker
-
fuse-7.9-GA
-
False
-
False
-
%
-
Undefined
Description
In Syndesis, I want to map a single field of all object from the source collection on a field in the target collection.
However, when I run the integration, the target message contains only array with one null element
Body: [[{"arr":[{"name":null}]}]]
Message before DataMapper
Body: [[{"id":1,"task":"test1","completed":0}, {"id":2,"task":"test2","completed":0}, {"id":3,"task":"test3","completed":0}]]
Message after DataMapper
Body: [[{"arr":[{"name":null}]}]]
Expected message
Body: [[{"arr":[{"name":"test1"}, {"name":"test2"}, {"name":"test3"}]}]]
Reproducible on upstream version `1.12.0-20210420` with AtlasMap version `2.2.0-M.4`
The default postrgesql connection is used as a source (select * from todo)
AMQ step is used as a target with JSON instance
e.g.
{ "officeNumber": 1, "arr": [ { "name":"test1", "surname":"surname1", "addresses":[ { "street":"street1" }, { "street":"street2" } ] } ] }
The integration is in the attachments.
This use case worked on previous version `1.12.0-20210414` with AtlasMap version `2.1.6`
Examples:
Message before DataMapper
Body: []
Message after DataMapper
Body: [[{"arr":[]}]]
====
Message before DataMapper
Body: [[{"id":1,"task":"test1","completed":0}, {"id":2,"task":"test2","completed":0}, {"id":3,"task":"test3","completed":0}]]
Message after DataMapper
Body: [[{"arr":[{"name":"test1"}, {"name":"test2"}, {"name":"test3"}]}]]