It looks like this provider doesn't support EF core complex object columns. we are trying to select nested properties on a complex column.
modelBuilder
.Entity<OtelTrace>()
.HasNoKey()
.ComplexProperty<ResourceAttributeObject>(
x => x.ResourceAttributes,
rb =>
{
rb.Property(x => x.ServiceName)
.HasColumnName("ServiceName");
}
);
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'))
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:
selecting the
ServiceNameon the ResourceAttributes column results in this sql query:but it should actually query the field
o.ResourceAttributes.ServiceNameinstead ofo.ServiceName