refactored getPrimarykey to getPrimaryKeyColumn