MySQL - Entity : The value for column 'IsPrimaryKey' in table 'TableDetails' is DBNull
Entity Framework (version 6.1.3) and MySQL Server (>= 5.7.6)
One way to resolve the issue is,
1. Open Services (services.msc) and restart MySQL57 service.
2. Execute the following commands in MySQL.
use <<database name>>;
set global optimizer_switch='derived_merge=OFF';
3. Update the .edmx.
It's a late reply. But hope it will help somebody.
Thanks.
This is a know bug: http://bugs.mysql.com/bug.php?id=79163
Run the command on mysql console:
set global optimizer_switch='derived_merge=off'
OR
set @@optimizer_switch='derived_merge=OFF'
(this one worked for me)
Verify that the change is effective with this command:
SELECT @@optimizer_switch\G
https://dev.mysql.com/doc/refman/5.7/en/switchable-optimizations.html