Add appropriate error message if no primary key