Hiya, I've been using the library for a while fine however recently I've implemented some more complex model relationships using code first, but the connector can't seem to drop this type of model when it changes due to MySQL key constraints. For example;
Code: Select all
public class ClassA {
public int Id {get;set;}
public virtual ClassB {get;set;}
}
public class ClassB {
public int Id {get;set;}
}
Results in an inner exception;
Cannot delete or update a parent row: a foreign key constraint fails
Presently the only way for me to get around this issue is to drop into MySQL, disable foreign key checks, then manually drop the table;
Code: Select all
SET FOREIGN_KEY_CHECKS = 0;
drop project_ClassA
SET FOREIGN_KEY_CHECKS = 1;
At which point the model can then be-recreated by the connector. So what am I missing?