implement removeObjectByPrimaryKey in Core and add to CoreTest