- 调整 增加支持 OneToOne 级联保存,EnableAddOrUpdateNavigateList 改名为 EnableAddOrUpdateNavigate;

This commit is contained in:
2881099
2022-05-04 15:49:05 +08:00
parent c9fa4d8983
commit b0ac5a8739
38 changed files with 190 additions and 198 deletions

View File

@ -194,7 +194,7 @@ namespace FreeSql.Tests.Odbc.Dameng
g.dameng.Delete<District>().Where("1=1").ExecuteAffrows();
var repo = g.dameng.GetRepository<District>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.Insert(new District
{
Code = "001",
@ -1728,7 +1728,7 @@ WHERE (((to_char(a.""ID"")) in (SELECT b.""TITLE""
var fsql = g.dameng;
fsql.Delete<BaseDistrict>().Where("1=1").ExecuteAffrows();
var repo = fsql.GetRepository<VM_District_Child>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.DbContextOptions.NoneParameter = true;
repo.Insert(new VM_District_Child
{

View File

@ -185,7 +185,7 @@ namespace FreeSql.Tests.Odbc.Default
g.odbc.Delete<District>().Where("1=1").ExecuteAffrows();
var repo = g.odbc.GetRepository<District>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.Insert(new District
{
Code = "001",
@ -1517,7 +1517,7 @@ WHERE (((cast(a.[Id] as nvarchar)) in (SELECT b.[Title]
var fsql = g.odbc;
fsql.Delete<BaseDistrict>().Where("1=1").ExecuteAffrows();
var repo = fsql.GetRepository<VM_District_Child>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.DbContextOptions.NoneParameter = true;
repo.Insert(new VM_District_Child
{

View File

@ -194,7 +194,7 @@ namespace FreeSql.Tests.Odbc.KingbaseES
g.kingbaseES.Delete<District>().Where("1=1").ExecuteAffrows();
var repo = g.kingbaseES.GetRepository<District>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.Insert(new District
{
Code = "001",
@ -1677,7 +1677,7 @@ WHERE ((((a.""ID"")::text) in (SELECT b.""TITLE""
var fsql = g.kingbaseES;
fsql.Delete<BaseDistrict>().Where("1=1").ExecuteAffrows();
var repo = fsql.GetRepository<VM_District_Child>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.DbContextOptions.NoneParameter = true;
repo.Insert(new VM_District_Child
{

View File

@ -294,7 +294,7 @@ namespace FreeSql.Tests.Odbc.MySql
g.mysql.Delete<District>().Where("1=1").ExecuteAffrows();
var repo = g.mysql.GetRepository<District>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.Insert(new District
{
Code = "001",
@ -1881,7 +1881,7 @@ WHERE ((b.`IsFinished` OR a.`TaskType` = 3) AND b.`EnabledMark` = 1)", groupsql1
var fsql = g.mysql;
fsql.Delete<BaseDistrict>().Where("1=1").ExecuteAffrows();
var repo = fsql.GetRepository<VM_District_Child>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.DbContextOptions.NoneParameter = true;
repo.Insert(new VM_District_Child
{

View File

@ -194,7 +194,7 @@ namespace FreeSql.Tests.Odbc.Oracle
g.oracle.Delete<District>().Where("1=1").ExecuteAffrows();
var repo = g.oracle.GetRepository<District>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.Insert(new District
{
Code = "001",
@ -1720,7 +1720,7 @@ WHERE (((to_char(a.""ID"")) in (SELECT b.""TITLE""
var fsql = g.oracle;
fsql.Delete<BaseDistrict>().Where("1=1").ExecuteAffrows();
var repo = fsql.GetRepository<VM_District_Child>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.DbContextOptions.NoneParameter = true;
repo.Insert(new VM_District_Child
{

View File

@ -270,7 +270,7 @@ namespace FreeSql.Tests.Odbc.PostgreSQL
g.pgsql.Delete<District>().Where("1=1").ExecuteAffrows();
var repo = g.pgsql.GetRepository<District>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.Insert(new District
{
Code = "001",
@ -1780,7 +1780,7 @@ WHERE ((((a.""id"")::text) in (SELECT b.""title""
var fsql = g.pgsql;
fsql.Delete<BaseDistrict>().Where("1=1").ExecuteAffrows();
var repo = fsql.GetRepository<VM_District_Child>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.DbContextOptions.NoneParameter = true;
repo.Insert(new VM_District_Child
{

View File

@ -1,4 +1,4 @@
using FreeSql.DataAnnotations;
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
@ -184,7 +184,7 @@ namespace FreeSql.Tests.Odbc.SqlServer
g.sqlserver.Delete<District>().Where("1=1").ExecuteAffrows();
var repo = g.sqlserver.GetRepository<District>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.Insert(new District
{
Code = "001",
@ -1666,7 +1666,7 @@ WHERE (((cast(a.[Id] as nvarchar(100))) in (SELECT b.[Title]
var fsql = g.sqlserver;
fsql.Delete<BaseDistrict>().Where("1=1").ExecuteAffrows();
var repo = fsql.GetRepository<VM_District_Child>();
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
repo.DbContextOptions.EnableAddOrUpdateNavigate = true;
repo.DbContextOptions.NoneParameter = true;
repo.Insert(new VM_District_Child
{

View File

@ -532,7 +532,7 @@ WHERE ROWNUM < 11";
).ToSql();
g.mysql.SetDbContextOptions(opt => opt.EnableAddOrUpdateNavigateList = true);
g.mysql.SetDbContextOptions(opt => opt.EnableAddOrUpdateNavigate = true);
var trepo = g.mysql.GetGuidRepository<TaskBuild>();
trepo.Insert(new TaskBuild
{