mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 增加 [Navigate(xx, TempPrimary = xx)] 与非主键关联;(仅支持查询)
This commit is contained in:
@ -162,7 +162,7 @@ namespace FreeSql
|
||||
if (_table.Properties.TryGetValue(propertyName, out var prop) == false) throw new KeyNotFoundException(DbContextStrings.NotFound_Property(_table.Type.FullName, propertyName));
|
||||
if (_table.ColumnsByCsIgnore.ContainsKey(propertyName)) throw new ArgumentException(DbContextStrings.TypeHasSetProperty_IgnoreAttribute(_table.Type.FullName, propertyName));
|
||||
|
||||
var tref = _table.GetTableRef(propertyName, true);
|
||||
var tref = _table.GetTableRef(propertyName, true, false);
|
||||
if (tref == null) return;
|
||||
switch (tref.RefType)
|
||||
{
|
||||
@ -220,7 +220,7 @@ namespace FreeSql
|
||||
if (_table.ColumnsByCsIgnore.ContainsKey(prop.Name)) return;
|
||||
if (_table.ColumnsByCs.ContainsKey(prop.Name)) return;
|
||||
|
||||
var tref = _table.GetTableRef(prop.Name, false); //防止非正常的导航属性报错
|
||||
var tref = _table.GetTableRef(prop.Name, false, false); //防止非正常的导航属性报错
|
||||
if (tref == null) return;
|
||||
DbSet<object> refSet = null;
|
||||
switch (tref.RefType)
|
||||
|
Reference in New Issue
Block a user