Skip to content

Commit fe99e47

Browse files
committed
Ignore Rule validation checks index as well
1 parent dcb2659 commit fe99e47

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Orm/Xtensive.Orm/Orm/Configuration/DomainConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,8 @@ private void ValidateMappingConfiguration(bool multischema, bool multidatabase)
677677
private void ValidateIgnoreConfiguration()
678678
{
679679
foreach (var ignoreRule in IgnoreRules) {
680-
if (string.IsNullOrEmpty(ignoreRule.Table) && string.IsNullOrEmpty(ignoreRule.Column))
681-
throw new InvalidOperationException(string.Format(Strings.ExIgnoreRuleXMustBeAppliedToColumnOrTable, ignoreRule));
680+
if (string.IsNullOrEmpty(ignoreRule.Table) && string.IsNullOrEmpty(ignoreRule.Column) && string.IsNullOrEmpty(ignoreRule.Index))
681+
throw new InvalidOperationException(string.Format(Strings.ExIgnoreRuleXMustBeAppliedToColumnIndexOrTable, ignoreRule));
682682
}
683683
}
684684

Orm/Xtensive.Orm/Strings.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Orm/Xtensive.Orm/Strings.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,8 +2354,8 @@ Error: {1}</value>
23542354
<data name="ExNonLinqCallsAreNotSupportedWithinQueryExecuteDelayed" xml:space="preserve">
23552355
<value>Non-LINQ calls are not supported within Query.ExecuteDelayed</value>
23562356
</data>
2357-
<data name="ExIgnoreRuleXMustBeAppliedToColumnOrTable" xml:space="preserve">
2358-
<value>Ignore rule '{0}' must be applied to column or table.</value>
2357+
<data name="ExIgnoreRuleXMustBeAppliedToColumnIndexOrTable" xml:space="preserve">
2358+
<value>Ignore rule '{0}' must be applied to column, index or table.</value>
23592359
</data>
23602360
<data name="ExTableXCantBeRemovedDueToForeignKeyYOfIgnoredTableOrColumn" xml:space="preserve">
23612361
<value>Table '{0}' can't be removed due to the foreign key '{1}' of a ignored table or column.</value>

0 commit comments

Comments
 (0)