//THERE IS ONLY 2 RECORDS
var sqlInsert1 = $"INSERT INTO SuperPower VALUES (null, 'FLY')";
var sqlInsert2 = $"INSERT INTO SuperPower VALUES (null, 'POWER')";
//SET THE FIRST SUPERPOWER ID... OK!
var sqlInsert3 = $"INSERT INTO Character VALUES (null, 'Kaz', 18, 1, 'Warrior', 125.2, 1)";
//**SHOULD THROW AND ERROR SINCE I'M REFERENCING THE SuperPowerID = 5, WICH DOESN'T EXISTS**
var sqlInsert4 = $"INSERT INTO Character VALUES (null, 'Marker', 19, 1, 'Mage', 180.2, 5)";`
But the record at sqlInsert4 is being inserted at the database.
If I try to insert violating the FK rule from SQLiteStudio, it throws an error of FK violation, wich is correct.
I'm running this commands:
But the record at sqlInsert4 is being inserted at the database. If I try to insert violating the FK rule from SQLiteStudio, it throws an error of FK violation, wich is correct.
Why the framework is not respecting FK rules?