TechTalk Genome v4.2

<Explicit> Element

Specifies that the connection in the many-to-many association is represented by an explicitely mapped association class.

<Member name=" property ">
<ManyToManyCollection>
<Explicit associationClass= " association-class-name " [ parentReference= " parent-reference-property-name ]" [ childReference= " child-reference-property-name ]" />
</ManyToManyCollection>
</Member>
association-class-name
The name of the class representing the connection objects in the many-to-many association.
parent-reference-property-name
The name of the property implementing the parent reference in the association class.
child-reference-property-name
The name of the property implementing the child reference in the association class.

Remarks

If the association type of the many-to-many association should appear in the domain model it has to be mapped as an individual type. In this case, the <Explicit> element has to be used to reference the mapped type in the collection mapping.

Examples

                      
  <Type name="Cage">

      <Member name="Keepers">
          <ManyToManyCollection>
              <Explicit
                  associationClass="CageService"
                  parentReference="Cage"
                  childReference="Keeper" />
          </ManyToManyCollection>
      </Member>
      
  </Type>
  
  <!-- individual mapping of the CageService class -->
  <Type name="CageService">
      <RootInheritance tableName="CageService"/>
          <PrimaryKey>
              <Key>Cage</Key>
              <Key>Keeper</Key>
          </PrimaryKey>
      <Sealed/>
      <CodeGeneratedProxy/>
    
      <Member name="Cage"><NearObjectReference/></Member>
      <Member name="Keeper"><NearObjectReference/></Member>
  </Type>
              

Requirements

Type: TechTalk.Genome.Mapping.ExplicitXmlData, TechTalk.Genome.Mapping.ManyToManyCollectionXmlData

Assembly: TechTalk.Genome.dll

Version: 4.2.11

Editions: Professional, Evaluation, Express

Database Platforms: Microsoft SQL Server 2000, Microsoft SQL Server 2005, Oracle 9i Release 2, Oracle 10g Release 2

See Also

<ManyToManyCollection> Element