Luxoft/BSSFramework

Fetch for domian objects that in ValueObject types doesn't work

llotall opened this issue · 0 comments

Describe the bug
For example, we have class that has value object type property

public class DomainClass1 : AuditPersistentDomainObjectBase 
{
    public virtual Component? Component { get; set; }
}

// where Component is 
public class Component : ValueObject
{
    public virtual DomainClass2? DomainClass2 { get; protected set; }
}

And fetch for this classes structure doesn't work, inspite on Nnhibernate Support.

...
bll.GetUnsecureQueryable(f => f.SelectNested(x => x.Component ).Select(x => x!.DomainClass2)).ToList();
...

As result low performance and big amount of useless requests.

To Reproduce
For reproducing use same classes structure as described above

Expected behavior
Fetch must work, amount of requests to database must decrease