Fix bug in code generation tool: toArray() instead of getData() in mapper