mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 04:35:29 +08:00
Update mongodb
This commit is contained in:
parent
fd4336dae1
commit
78dae197ee
@ -107,12 +107,17 @@ namespace SqlSugar.MongoDb
|
|||||||
|
|
||||||
if (col.IsPrimarykey || pks.Contains(col.DbColumnName))
|
if (col.IsPrimarykey || pks.Contains(col.DbColumnName))
|
||||||
{
|
{
|
||||||
if (col.DbColumnName.EqualCase("_id"))
|
if (col.Value == null)
|
||||||
{
|
{
|
||||||
if (col.Value != null)
|
filter[col.DbColumnName] = UtilMethods.MyCreate(col.Value);
|
||||||
{
|
}
|
||||||
filter[col.DbColumnName] = UtilMethods.MyCreate(ObjectId.Parse(col.Value?.ToString()));
|
else if(col.DbColumnName.EqualCase("_id"))
|
||||||
}
|
{
|
||||||
|
filter[col.DbColumnName] = UtilMethods.MyCreate(ObjectId.Parse(col.Value?.ToString()));
|
||||||
|
}
|
||||||
|
else if (col.DataType == nameof(ObjectId))
|
||||||
|
{
|
||||||
|
filter[col.DbColumnName] = UtilMethods.MyCreate(ObjectId.Parse(col.Value?.ToString()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user