mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update MySql
This commit is contained in:
parent
2a30d4f62c
commit
1cce0e30a5
@ -9,6 +9,7 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public override string GetTranslationTableName(string name)
|
public override string GetTranslationTableName(string name)
|
||||||
{
|
{
|
||||||
|
if (name.Contains("`")) return name;
|
||||||
Check.ArgumentNullException(name, string.Format(ErrorMessage.ObjNotExist, "Table Name"));
|
Check.ArgumentNullException(name, string.Format(ErrorMessage.ObjNotExist, "Table Name"));
|
||||||
var context = this.Context;
|
var context = this.Context;
|
||||||
var mappingInfo = context
|
var mappingInfo = context
|
||||||
@ -31,11 +32,14 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public override string GetTranslationColumnName(string propertyName)
|
public override string GetTranslationColumnName(string propertyName)
|
||||||
{
|
{
|
||||||
return "`" + propertyName + "`";
|
if (propertyName.Contains("`")) return propertyName;
|
||||||
|
else
|
||||||
|
return "`" + propertyName + "`";
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string GetNoTranslationColumnName(string name)
|
public override string GetNoTranslationColumnName(string name)
|
||||||
{
|
{
|
||||||
|
if (!name.Contains("`")) return name;
|
||||||
return name == null ? string.Empty : Regex.Match(name, @"\`(.*?)\`").Groups[1].Value;
|
return name == null ? string.Empty : Regex.Match(name, @"\`(.*?)\`").Groups[1].Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package >
|
<package >
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>sqlSugar</id>
|
<id>sqlSugar</id>
|
||||||
<version>4.0.5</version>
|
<version>4.0.6</version>
|
||||||
<title>SqlSugar SqlServer ORM</title>
|
<title>SqlSugar SqlServer ORM</title>
|
||||||
<authors>sun kaixuan</authors>
|
<authors>sun kaixuan</authors>
|
||||||
<owners>landa</owners>
|
<owners>landa</owners>
|
||||||
|
Loading…
Reference in New Issue
Block a user