-
My application was previously structured like so: public abstract class Category : Entity {
public virtual Category? Parent { get; set; }
...
}
public abstract class ContentCategory : Category { ... }
public class BlogPostCategory : ContentCategory { ... }
public class PageCategory : ContentCategory { ... }
public abstract class ContentItem : Entity {
public virtual ContentCategory Category { get; set; }
...
}
public BlogPost : ContentItem { ... }
public Page : ContentItem { ... } Where each type (apart from However if I tried retrieving the await session.Query<BlogBlog>().Fetch(p => p.Category).ToListAsync(); I noticed that the SQL does a join against the public BlogPost : ContentItem {
public virtual BlogPostCategory Category { get; set; }
...
}
public Page : ContentItem {
public virtual PageCategory Category { get; set; }
...
} This fixed the issue. However if I now say: await session.Query<BlogBlogCategory>().Fetch(c => c.Parent).ToListAsync(); The same problem exists as the I'd really appreciate any advice. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Mappings? |
Beta Was this translation helpful? Give feedback.
Mappings?