Skip to content

Lazy loading and Eager initialization for Component #1861

@megafetis

Description

@megafetis

For example:

class Organization
{
    public virtual string Name {get;set;}
    public virtual Address Address {get;set;}
}
class Address
{
    public virtual string City {get;set;}
    public virtual Address Street {get;set;}
}

protected OrganizationMap()
{
    Id(p => p.Id).GeneratedBy.UuidHex("N").Length(32);
    Component(p => p.Address, a =>
    {
        a.LazyLoad();
        a.ColumnPrefix("adr_");
        a.Map(p => p.Street);
        a.Map(p => p.City);
    });   
    Map(p => p.Name).Not.Nullable();
}

var orgs = nHsession.QueryOver<Organization>().Fetch(p=>p.Address).Eager.List();

Please add feature to Eager load mapped as Component properties

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions