Skip to content

SplitQuery per-table definition #29089

@gdoron

Description

@gdoron

Currently (AFAIK) it's only possible to either have SingleQuery or SplitQuery defined globally for all queries, or per-query.
Would have been really helpful being able to set the default split query mode per table.
Consider a blogs -> posts relation, our blog has a logo column with max 4MB of data per row.
Joining the blog with its 10K posts can be devastating.

I think it should also be possible to set the mode by entity:

public class BlogConfiguration IEntityTypeConfiguration<BlogEntity>
{
    public void Configure(EntityTypeBuilder<BlogEntity> builder)
    {
        builder.Property(entity => entity.Logo).HasMaxLength(1024 * 1024 * 4);
        builder.WithSplitQuery(true);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions