When more than one association of the same type exists on a model use this attribute to specify the name of the reverse association field on the target type. The attribute only needs to be applied to one end of the association (either one) not both. N.B. This is only required when there is more than one association between two models. i.e. One table has more than one foreign key to another table.

Examples

CopyC#
// type Contribution

private readonly EntityHolder<Member> _approvedBy = new EntityHolder<Member>();
private readonly EntityHolder<Member> _contributor = new EntityHolder<Member>();

// type Member

[ReverseAssociation("Contributor")]
private readonly EntityCollection<Contribution> _contributions
  = new EntityCollection<Contribution>();

[ReverseAssociation("ApprovedBy")]
private readonly EntityCollection<Contribution> _approvedContributions
  = new EntityCollection<Contribution>();

Namespace:  Mindscape.LightSpeed
Assembly:  Mindscape.LightSpeed (in Mindscape.LightSpeed.dll)
Version: 4.0.0.0 (4.0.0.0)

Syntax

C#
[AttributeUsageAttribute(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public sealed class ReverseAssociationAttribute : Attribute
Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.Field, AllowMultiple := False, Inherited := False)> _
Public NotInheritable Class ReverseAssociationAttribute _
	Inherits Attribute

Inheritance Hierarchy

System..::.Object
  System..::.Attribute
    Mindscape.LightSpeed..::.ReverseAssociationAttribute

See Also