allow passing type of record in retrieve/remove by primary key