TechTalk Genome v4.2

<Relation> Element

Specifies a set that describes the relation between persistent instances represented by a collection.

<Member name=" member "
Relation=" oql-expression "


<Member name=" member ">
<Relation source=" oql-expression " />
A member name specifying a property or a method on type .
An OQL expression that returns a set.


The <Relation> element specifies the set that describes the relation between persistent instances represented by the member set property.

The specified set has to return all related persistent object pairs that are represented by the member set property, in a set that is projected to an object array. The projected array must have exactly two items. The first item refers to the elements of the parent object, while the second refers to the items of the member set property. Therefore, the type of the first expression has to be type and the type of the second expression has to be the element type of the set returned by member.

The specified set is used for further transformations required by the PredictiveCacheManager.PrecacheSet method. Genome does not evaluate without further transformations.

For the most common collection mappings, Genome can automatically generate the relation. You only need to specify the <Relation> element if automatic relation analysis is not supported for the member.

Please see the documentation for the PredictiveCacheManager.PrecacheSet method to read more about collection structures that can be analysed automatically and for examples of relations.


Type: TechTalk.Genome.Mapping.RelationXmlData

Assembly: TechTalk.Genome.dll

Version: 4.2.11

Editions: Professional, Evaluation

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

See Also

Other Elements | PredictiveCacheManager.PrecacheSet