From ff246d81257fd839d296fcb3f356b56435b6c927 Mon Sep 17 00:00:00 2001 From: Vasiliy Chernoivan Date: Tue, 10 Apr 2018 16:15:17 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B0=20=D0=B1=D1=8B=D0=BB=D0=B0=20=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=9E=D0=B1=D0=BB=D0=B0=D1=81=D1=82=D1=8C=D0=B4=D0=B0?= =?UTF-8?q?=D0=BD=D0=BD=D1=8B=D1=85=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D0=B5=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Simple1C/Impl/Sql/Translation/QueryToSqlTranslator.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Simple1C/Impl/Sql/Translation/QueryToSqlTranslator.cs b/Simple1C/Impl/Sql/Translation/QueryToSqlTranslator.cs index 0d686a6..c02653e 100644 --- a/Simple1C/Impl/Sql/Translation/QueryToSqlTranslator.cs +++ b/Simple1C/Impl/Sql/Translation/QueryToSqlTranslator.cs @@ -157,11 +157,14 @@ public override SelectClause VisitSelect(SelectClause clause) if (tableClause == null) return base.VisitSelect(clause); var tableMapping = mappingSource.ResolveTableByDbNameOrNull(tableClause.Name); + var property = tableMapping.GetByPropertyName("ОбластьДанныхОсновныеДанные"); + if (property == null) + return base.VisitSelect(clause); var areaExpression = new InExpression { Column = new ColumnReferenceExpression { - Name = tableMapping.GetByPropertyName("ОбластьДанныхОсновныеДанные").SingleLayout.DbColumnName, + Name = property.SingleLayout.DbColumnName, Table = clause.Source }, Source = new ListExpression