Don't call getGeneratedKeys() if no keys were supposed to be generated