From 62e2d5c1ec0e8ec8ae32d9457beb87a25b061806 Mon Sep 17 00:00:00 2001 From: Doug Mealing Date: Tue, 1 Dec 2026 20:52:06 -0500 Subject: [PATCH] C#: drop the stale "deprecated alias @dbSetName" wording from CSharpNaming The loader refuses @dbSetName outright (ERR_UNKNOWN_ATTR), so no codegen path can ever see it: the DbSet doc comment and the refused-name error text still described it as a deprecated alias. Text only, no behaviour change. CSharpNamingTests asserts "@collectionName" and the offending name in the message, so it still passes unchanged (2076 passed, 1 skipped). --- server/csharp/MetaObjects.Codegen/CSharpNaming.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/csharp/MetaObjects.Codegen/CSharpNaming.cs b/server/csharp/MetaObjects.Codegen/CSharpNaming.cs index 3adef6c8f..3274c2afe 100644 --- a/server/csharp/MetaObjects.Codegen/CSharpNaming.cs +++ b/server/csharp/MetaObjects.Codegen/CSharpNaming.cs @@ -433,7 +433,7 @@ public static string RoutePath(MetaObject entity) => /// /// The DbSet property name for an object: its collection name (rc.19, R57) — its own - /// @collectionName (or the deprecated @dbSetName alias), else the configured + /// @collectionName, else the configured /// pluralizer (naming.collections) over Pascal(name), else the historical /// Pluralize(Pascal(name)) (which keeps C#'s -sis rule, so an unconfigured /// project's DbSets are unchanged). Every site that names the property (the context, the routes, @@ -451,7 +451,7 @@ public static string DbSetName(MetaObject entity) // error in the generated context (or a property that hides DbContext.Database). if (!System.Text.RegularExpressions.Regex.IsMatch(declared, "^[A-Za-z_][A-Za-z0-9_]*$") || ReservedDbSetNames.Contains(declared)) throw new InvalidOperationException( - $"{entity.ResolutionKey()}: the collection name \"{declared}\" (@collectionName, or its deprecated alias @dbSetName) cannot be the DbSet property name — it must be a C# identifier " + + $"{entity.ResolutionKey()}: the collection name \"{declared}\" (@collectionName) cannot be the DbSet property name — it must be a C# identifier " + "(letters, digits and underscores, not starting with a digit) and not a DbContext member (Database, Model, ChangeTracker, ContextId)."); return declared; }