MasterDetailRelationAttribute class

namespace: Serenity.Data.Mapping   assemblySerenity.Net.Data

Defines a master detail relation (1-N) between this row and another

[AttributeUsage(AttributeTargets.Property)]
public sealed class MasterDetailRelationAttribute : Attribute

Public Members

name description
MasterDetailRelationAttribute(…) Initializes a new instance of the MasterDetailRelationAttribute class.
CheckChangesOnUpdate { get; set; } Gets or sets a value indicating whether to check changes on update. Disable this if you are getting comparison errors.
ColumnSelection { get; set; } Gets or sets the column selection.
FilterField { get; set; } Gets or sets the filter field.
FilterValue { get; set; } Gets or sets the filter value.
ForceCascadeDelete { get; set; } Forces deletion of linking row records even if master record uses soft delete. If false (default) this doesn't delete linking records, as master record might be undeleted.
ForeignKey { get; } Gets the foreign key.
IncludeColumns { get; set; } Gets or sets the comma separated list of include columns.
MasterKeyField { get; set; } Optional: override the default behaviour and use a different id field (i.e. from a unique constraint)

See Also