Mindscape LightSpeed - User Reference & API Documentation
ReverseAssociationAttribute Class
API ReferenceMindscape.LightSpeedReverseAssociationAttribute
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>();
Declaration Syntax
C#Visual Basic
[AttributeUsageAttribute(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public sealed class ReverseAssociationAttribute : Attribute
<AttributeUsageAttribute(AttributeTargets.Field, AllowMultiple := False, Inherited := False)> _
Public NotInheritable Class ReverseAssociationAttribute _
	Inherits Attribute
Members
All MembersConstructorsProperties



IconMemberDescription
ReverseAssociationAttribute(String)
Initializes a new instance of the ReverseAssociationAttribute class.

FieldName
The name of the field representing the reverse association.

Inheritance Hierarchy
Object
Attribute
 ReverseAssociationAttribute

Assembly: Mindscape.LightSpeed (Module: Mindscape.LightSpeed) Version: 1.2.1393.0 (1.2.1393.0)