Ugh: metadata api and metadata merge