Table of Contents

Class NonEditableReferenceAttribute

Namespace
GroupeIsa.Neos.Domain
Assembly
GroupeIsa.Neos.Domain.Abstractions.dll

Attribute to mark a reference property whose related record is not editable (its EntityView reference has HasEditableProperties == false), listing the server-generated key properties of the referenced entity view: the auto-incremented integer, GUID or optional single string keys, whose empty value means "new record" on an editable reference. On save, the server only looks for the existing record of a non-editable reference by its key and never creates one, so setting one of these keys to an empty value (for example item.Reference.Id = 0) always makes the save fail. The transpiler reports these assignments as warnings.

[AttributeUsage(AttributeTargets.Property)]
public class NonEditableReferenceAttribute : Attribute
Inheritance
NonEditableReferenceAttribute
Inherited Members

Constructors

NonEditableReferenceAttribute(params string[])

Initializes a new instance of the NonEditableReferenceAttribute class.

public NonEditableReferenceAttribute(params string[] keyPropertyNames)

Parameters

keyPropertyNames string[]

The names of the server-generated key properties of the referenced entity view.

Properties

KeyPropertyNames

Gets the names of the server-generated key properties of the referenced entity view.

public string[] KeyPropertyNames { get; }

Property Value

string[]