Implement multi-field mapping generation

(from redmine: issue id 879, created on 2018-01-22tgradl, closed on 2018-08-10)