This commit is contained in:
sunkaixuan
2017-05-28 09:33:30 +08:00
parent 235fcc9715
commit e8997a1d92
2 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ namespace OrmTest.UnitTest
.Where("st.id>@id")
.AddParameters(new { id = 1 })
.Select("st.*").ToSql();
string sql = @"SELECT st.* FROM [STudent] st Left JOIN School sh ON sh.id=st.schoolid WHERE st.id>@id ";
string sql = @"SELECT st.* FROM [Student] st Left JOIN School sh ON sh.id=st.schoolid WHERE st.id>@id ";
base.Check(sql,new List<SugarParameter>() {new SugarParameter("@id",1)}, join3.Key, join3.Value, "join 3 Error");
}
}

View File

@@ -70,18 +70,18 @@ namespace SqlSugar
protected void InitMppingInfo<T>()
{
string cacheKey = "Context.InitAttributeMappingTables"+typeof(T).FullName;
CacheFactory.Action<EntityInfo>(cacheKey,
var entityInfo=CacheFactory.Func<EntityInfo>(cacheKey,
(cm, key) =>
{
var cacheInfo = cm[key];
InitMppingInfo(cacheInfo);
return cacheInfo;
},
(cm, key) =>
{
var reval = this.Context.EntityProvider.GetEntityInfo<T>();
InitMppingInfo(reval);
return reval;
});
InitMppingInfo(entityInfo);
}
private void InitMppingInfo(EntityInfo entityInfo)
{