Skip to content

Support to select nested columns #213

@OneCyrus

Description

@OneCyrus

It looks like this provider doesn't support EF core complex object columns. we are trying to select nested properties on a complex column.

basically:

modelBuilder
    .Entity<OtelTrace>()
    .HasNoKey()
    .ComplexProperty<ResourceAttributeObject>(
        x => x.ResourceAttributes,
        rb =>
        {
            rb.Property(x => x.ServiceName)
                .HasColumnName("ServiceName");
        }
    );

selecting the ServiceName on the ResourceAttributes column results in this sql query:

Code: 47. DB::Exception: Identifier 'o.ServiceName' cannot be resolved from table with name o. In scope SELECT o.Duration, o.`Events.Name`, o.`Events.Timestamp`, o.`Links.SpanId`, o.`Links.TraceId`, o.`Links.TraceState`, o.ParentSpanId, o.ScopeName, o.ScopeVersion, o.SpanId, o.SpanKind, o.SpanName, o.StatusCode, o.StatusMessage, o.Timestamp, o.TraceId, o.TraceState, o.TestName FROM otel_traces AS o WHERE (o.Timestamp >= _CAST(1779177934, 'DateTime')) AND (o.Timestamp <= _CAST(1779181534, 'DateTime'))

but it should actually query the field o.ResourceAttributes.ServiceName instead of o.ServiceName

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions