Create new metadata API also updates if entity exists

Fixes core 55