I have a class and a map for this class
public class TestClass
{
public virtual Subcategory SubCategory { get; set; }
}
public TestClassMuMap()
{
Id(e => e.Id).Column("ID").GeneratedBy.Assigned();
References(x => x.SubCategory).Column("Subcategory");
}
In received objects I found new member SubcategoryProxyf528587c5459469ba2347093600432d8
How can I get rid of it?
Not.LazyLoad()
shoud do it:
References(x => x.SubCategory).Not.LazyLoad().Column("Subcategory");
But LazyLoad is a good thing, check if you really have problem with getting proxy
What is LazyLoad?
Collections (other than arrays) may be lazily initialized, meaning they load their state from the database only when the application needs to access it. Initialization happens transparently to the user so the application would not normally need to worry about this.
Read more in the docs