Add fieldname_ids to metadata for m2m fields