File tree Expand file tree Collapse file tree 4 files changed +17
-2
lines changed
IntelliTect.Coalesce.Tests/TargetClasses/TestDbContext
IntelliTect.Coalesce/TypeDefinition Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 55- Fix ` c-admin-editor-page ` briefly showing editors while the item is initially loading.
66- ` c-input ` no longer wraps default slot fallback content in a superfluous div.
77- ` c-input ` no longer attempts to delegate shared-key one-to-one properties to ` c-select ` , a scenario that is not possible to select values for.
8+ - DTOs no longer generate MapToNew methods with unsatisfied ` required ` constraints.
89
910# 6.0.1
1011- ` createAspNetCoreHmrPlugin ` now displays NPM package mismatches with the standard vite overlay instead of a custom overlay.
Original file line number Diff line number Diff line change 1+ using IntelliTect . Coalesce . DataAnnotations ;
2+
3+ namespace IntelliTect . Coalesce . Tests . TargetClasses . TestDbContext ;
4+
5+ [ Create ( SecurityPermissionLevels . DenyAll ) ]
6+ [ Edit ( SecurityPermissionLevels . DenyAll ) ]
7+ public class RequiredInternalUseModel
8+ {
9+ public int Id { get ; set ; }
10+
11+ [ InternalUse ]
12+ public required string InternalRequiredProp { get ; init ; }
13+ }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public class AppDbContext : DbContext
1919 public DbSet < ComplexModelDependent > ComplexModelDependents { get ; set ; }
2020 public DbSet < ReadOnlyEntityUsedAsMethodInput > ReadOnlyEntityUsedAsMethodInputs { get ; set ; }
2121 public DbSet < RequiredAndInitModel > RequiredAndInitModels { get ; set ; }
22+ public DbSet < RequiredInternalUseModel > RequiredInternalUseModels { get ; set ; }
2223 public DbSet < Test > Tests { get ; set ; }
2324
2425 public DbSet < AbstractModel > AbstractModels { get ; set ; }
Original file line number Diff line number Diff line change @@ -340,15 +340,15 @@ public ConstructorUsage DtoMapToNewConstructorUsage
340340#if NET7_0_OR_GREATER
341341 if ( ! this . HasAttribute < System . Diagnostics . CodeAnalysis . SetsRequiredMembersAttribute > ( ) )
342342 {
343- foreach ( var requiredProp in Parent . ClientProperties . Where ( p => p . HasRequiredKeyword ) )
343+ foreach ( var requiredProp in Parent . Properties . Where ( p => p . HasRequiredKeyword ) )
344344 {
345345 if ( ! incomingProperties . ContainsKey ( requiredProp . Name ) )
346346 {
347347 return new ConstructorUsage
348348 {
349349 IsAcceptable = false ,
350350 Reason = $ "Required property `{ requiredProp . Name } ` is not accepted as an input, " +
351- $ "so Coalesce cannnot satisfy its `required` constraint. Adding [SetsRequiredMembers] will suppress this."
351+ $ "so Coalesce cannot satisfy its `required` constraint. Adding [SetsRequiredMembers] will suppress this."
352352 } ;
353353 }
354354 }
You can’t perform that action at this time.
0 commit comments