psewar / Raidfelden.Discord.Bot

A Discord Bot built to add Crowd Sourced raids and pokemon to Monocle maps
MIT License
1 stars 1 forks source link

Unable to cast object of type 'System.Boolean' to type 'System.SByte'. #7

Open yw2theorycrafter opened 6 years ago

yw2theorycrafter commented 6 years ago

The mysqlconnector will sometimes throw Unable to cast object of type 'System.Boolean' to type 'System.SByte'.

Which, there is a standard solution https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/285 (Add "TreatTinyAsBoolean=false;" to your connection string)

This happens whenever there are tinyint rows used to store data that is not 0 or 1, which was the case for the team row in the forts_sightings table. This only started happening when we combined scanning with raid submission, as scanning labels the team id of gyms..