异常内容: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.lang.NullPointerException### The error may exist in file [xxxxx.xml]### The error may inv
预定义的过滤 ISoftDelete 软删除过滤用来在查询数据库时,自动过滤(从结果中抽取)已删除的实体.如果一个实体可以被软删除,它必须实现ISoftDelete接口,该接口只定义了一个IsDeleted属性,例如: public class Person : Entity, ISoftDelete { public virtual string Name { get; set; } public virtual bool IsDeleted { get; set; } } 不会真实删除数据
一个事务中 先在数据库查出一条数据进行修改 然后在进行查询 他会直接在内存中找到这条数据 不会再数据库查询了 EF Core的 linq语句中可以使用C#方法或函数 在EF6或之前版本不可以 .Include() 在EF Core和 EF6中支持lamada表达式 之前的版本该方法只接受列名字符串 使用原生sql 配置一对一关系 在EF6.X或之前不支持 public class Student { public int Id { get; set; } publ