Added hideForeignKeys support to merge