Есть Property:
1.
2.
3.
4.
5.
6.
public class Property : DomainObject<Guid>, IEquatable<Property>
{
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual PropertyTypeEnum? Type { get; set; }
.......
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="NVX.Tenders.Core.Domain.Property, NVX.Tenders.Core" table="Property" lazy="true" optimistic-lock="version">
<id name="ID" column="ID">
<generator class="guid" />
</id>
<property name="Name" />
<property name="Description" />
<property name="Type" />
</class>
</hibernate-mapping>
Есть AuctionTypeProperty:
1.
2.
3.
4.
5.
6.
7.
8.
public class AuctionTypeProperty : DomainObject<Guid>, IEquatable<AuctionTypeProperty>
{
public virtual string DefaultValue { get; set; }
public virtual int? OrderIndex { get; set; }
public virtual Property Property { get; set; }
public virtual AuctionType AuctionType { get; set; }
.............
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="NVX.Tenders.Core.Domain.AuctionTypeProperty, NVX.Tenders.Core" table="AuctionTypeProperty" lazy="true" optimistic-lock="version">
<id name="ID" column="ID">
<generator class="guid" />
</id>
<property name="DefaultValue" />
<property name="OrderIndex" />
<many-to-one name="Property" column="PropertyID" class="NVX.Tenders.Core.Domain.Property, NVX.Tenders.Core" />
<many-to-one name="AuctionType" column="AuctionTypeID" class="NVX.Tenders.Core.Domain.AuctionType, NVX.Tenders.Core" />
</class>
</hibernate-mapping>
И есть AuctionType:
1.
2.
3.
4.
public class AuctionType : DomainObject<Guid>, IEquatable<AuctionType>
{
public virtual string Name { get; set; }
public virtual string Description { get; set; }
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="NVX.Tenders.Core.Domain.AuctionType, NVX.Tenders.Core" table="AuctionType" lazy="true" optimistic-lock="version">
<id name="ID" column="ID">
<generator class="guid" />
</id>
<property name="Name" />
<property name="Description" />
</class>
</hibernate-mapping>
(у всех есть Guid ID - объявлен в классе DomainObject<Guid>).
Как организовать связи/маппинг/запросы, чтобы одним list() получить все AuctionTypeProperty у Auction с определённым ID и чтобы у них всех были проинициализированы Property? Но при этом, от lazy у классов отказывается очень не хочется.