Add getForeignFields method