TechTalk Genome v4.2

<LoadAlso> Element

Specifies the set of properties to retrieve from the database together with the accessed property if it is not yet loaded up.

<Member name=" property "


<Member name=" property "
A persistent property that is mapped using one of the field mappings.
A view within the type.
A persistent property of type.


<LoadAlso> element specifies the set of properties to retrieve from the database together with the property if property is accessed but not loaded up yet. The property set can be specified as the union of one or more view or property-to-load.

Not specifying the <LoadAlso> element for a property is equivalent to specifying the full view, i.e. all properties are loaded up.

The properties default view is always implicitly added to the specified property set, therefore specifying the default in the <LoadAlso> element can only be used to change the default behaviour.

Regardless of the specified property set, properties that are already loaded up to the Context are not queried again.


public abstract class BusinessContact : Persistent {
    public abstract int Id { get; set }
    public abstract string FirstName { get; set; }
    public abstract string LastName { get; set; }
    public abstract string Position { get; set; }
    public abstract string CompanyName { get; set }
    public abstract string CompanyAddress { get; set }
<Mapping xmlns="urn:TechTalk:TT.OODAL.XmlMapping">

    <Type name="BusinessContact">
        <RootInheritance />

        <View name="default">

        <View name="ContactPersonData">

        <View name="CompanyData">
        <Member name="FirstName"><PersistentField /></Member>
        <Member name="LastName"><PersistentField /></Member>
        <Member name="Position"><PersistentField /></Member>
        <Member name="CompanyName" LoadAlso="CompanyData"><PersistentField /></Member>
        <Member name="CompanyAddress">
            <PersistentField />


Type: TechTalk.Genome.Mapping.LoadAlsoXmlData

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

<View> Element | Other Elements