mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
✨ support provider、Extensions Exceptions 多语言
This commit is contained in:
@ -54,7 +54,7 @@ namespace FreeSql.MySql.Curd
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_table.Primarys.Any() == false) throw new Exception($"fsql.InsertOrUpdate + IfExistsDoNothing + MySql 要求实体类 {_table.CsName} 必须有主键");
|
||||
if (_table.Primarys.Any() == false) throw new Exception(CoreStrings.Entity_Must_Primary_Key("fsql.InsertOrUpdate + IfExistsDoNothing + MySql ", _table.CsName));
|
||||
sql = insert.ToSqlValuesOrSelectUnionAllExtension101(false, (rowd, idx, sb) =>
|
||||
sb.Append(" \r\n FROM dual WHERE NOT EXISTS(").Append(
|
||||
_orm.Select<T1>()
|
||||
|
@ -17,7 +17,7 @@ namespace FreeSql.MySql.Curd
|
||||
public OnDuplicateKeyUpdate(IInsert<T1> insert)
|
||||
{
|
||||
_mysqlInsert = insert as MySqlInsert<T1>;
|
||||
if (_mysqlInsert == null) throw new Exception("OnDuplicateKeyUpdate 是 FreeSql.Provider.MySql/FreeSql.Provider.MySqlConnector 特有的功能");
|
||||
if (_mysqlInsert == null) throw new Exception(CoreStrings.S_Features_Unique("OnDuplicateKeyUpdate", "MySql/FreeSql.Provider.MySqlConnector"));
|
||||
if (_mysqlInsert._noneParameterFlag == "c") _mysqlInsert._noneParameterFlag = "cu";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user