fix transforming _id to date in related tables

In the case that the "value" is an array (which is really an array of
values to transform) we should recurse and apply transform on each
element.