修改外键约束
This commit is contained in:
1 parent
76f4602bca
commit
f606f80584
1 file changed
+2
@@ -369,8 +369,10 @@ public class projectDao {
|
||||
try {
|
||||
Connection conn = JdbcUtils.getConnection();
|
||||
QueryRunner runner = new QueryRunner();
|
||||
runner.update(conn,"set foreign_key_checks = 0");
|
||||
String sql="delete from project where projectId = ?";
|
||||
num = runner.update(conn,sql,id);
|
||||
runner.update(conn,"set foreign_key_checks = 1");
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user