Fix Registry and metadata Key duplication

For Object registered into Registry, ONLY primaryKey is used