Joe4evr / Discord.Addons

Useful extensions for Discord.Net
MIT License
19 stars 5 forks source link

removed the [Not Mapped] attributes from properties #12

Closed theCorb1nator closed 6 years ago

theCorb1nator commented 6 years ago

removed the [Not Mapped] attribute from properites in EFCoreProvider to stop duplication of database entries,

Tested with [Not Mapped] removed have working against 2.0 beta of discord.net

Joe4evr commented 6 years ago

Removing [NotMapped] from those entity properties causes problems with DBs that don't support unsigned integer columns (SQLite and various others).

The UseSimplePermissions task is commented out because once the OnModuleAdded branch gets merged into 2.0, registering a module requires your IServicePovider instance to be done (well, preferably).

theCorb1nator commented 6 years ago

Thanks for the update,

Why does it duplicate database entries when the properties are marked as [Not Mapped]?

Because unless im wrong unless it stores the Ids for guilds, channels, users in the DB when it calls AddGuild it will create it again as it cant find the id in the database?

Is there some further checking to be added