You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a type with nullable DateTime properties, which in some cases I need to add to my FilterCondition. When I do that, I get the error below. It looks like this is because NullableValueTypeDdbConverter inherits from DdbConverter but changes the nullability of the type parameter, which for value types means a totally different type.
Unable to cast object of type 'EfficientDynamoDb.Internal.Converters.NullableValueTypeDdbConverter1[System.DateTime]' to type 'EfficientDynamoDb.Converters.DdbConverter1[System.DateTime]'.
at EfficientDynamoDb.FluentCondition.Core.FilterBase1.GetPropertyConverter[TProperty](DdbExpressionVisitor visitor, Boolean useSize) at EfficientDynamoDb.FluentCondition.Operators.Common.FilterLessThan2.WriteAttributeValues(DdbWriter& writer, DynamoDbContextMetadata metadata, Int32& valuesCount, DdbExpressionVisitor visitor)
at EfficientDynamoDb.FluentCondition.Core.FilterOrWrapper.WriteAttributeValues(DdbWriter& writer, DynamoDbContextMetadata metadata, Int32& valuesCount, DdbExpressionVisitor visitor)
at EfficientDynamoDb.FluentCondition.Core.FilterOrWrapper.WriteAttributeValues(DdbWriter& writer, DynamoDbContextMetadata metadata, Int32& valuesCount, DdbExpressionVisitor visitor)
at EfficientDynamoDb.FluentCondition.Core.FilterAndWrapper.WriteAttributeValues(DdbWriter& writer, DynamoDbContextMetadata metadata, Int32& valuesCount, DdbExpressionVisitor visitor)
at EfficientDynamoDb.Internal.Extensions.Utf8JsonWriterExtensions.WriteConditionExpression(DdbWriter& writer, NoAllocStringBuilder& builder, DdbExpressionVisitor visitor, FilterBase condition, DynamoDbContextMetadata metadata)
at EfficientDynamoDb.Internal.Extensions.Utf8JsonWriterExtensions.WriteConditionExpression(DdbWriter& writer, FilterBase condition, DynamoDbContextMetadata metadata)
at EfficientDynamoDb.Internal.Operations.PutItem.PutItemHighLevelHttpContent.WriteDataAsync(DdbWriter ddbWriter)
at EfficientDynamoDb.Internal.Operations.Shared.DynamoDbHttpContent.SerializeToStreamAsync(Stream stream, TransportContext context)
at EfficientDynamoDb.Internal.Operations.Shared.DynamoDbHttpContent.SerializeToStreamAsync(Stream stream, TransportContext context)
at EfficientDynamoDb.Internal.Operations.Shared.DynamoDbHttpContent.CreatePooledContentReadStreamAsync()
at EfficientDynamoDb.Internal.HttpApi.SendAsync(DynamoDbContextConfig config, HttpContent httpContent, CancellationToken cancellationToken)
at EfficientDynamoDb.DynamoDbContext.PutItemAsync[TEntity](BuilderNode node, CancellationToken cancellationToken)
The text was updated successfully, but these errors were encountered:
I have a type with nullable DateTime properties, which in some cases I need to add to my FilterCondition. When I do that, I get the error below. It looks like this is because NullableValueTypeDdbConverter inherits from DdbConverter but changes the nullability of the type parameter, which for value types means a totally different type.
Unable to cast object of type 'EfficientDynamoDb.Internal.Converters.NullableValueTypeDdbConverter
1[System.DateTime]' to type 'EfficientDynamoDb.Converters.DdbConverter
1[System.DateTime]'.at EfficientDynamoDb.FluentCondition.Core.FilterBase
1.GetPropertyConverter[TProperty](DdbExpressionVisitor visitor, Boolean useSize) at EfficientDynamoDb.FluentCondition.Operators.Common.FilterLessThan
2.WriteAttributeValues(DdbWriter& writer, DynamoDbContextMetadata metadata, Int32& valuesCount, DdbExpressionVisitor visitor)at EfficientDynamoDb.FluentCondition.Core.FilterOrWrapper.WriteAttributeValues(DdbWriter& writer, DynamoDbContextMetadata metadata, Int32& valuesCount, DdbExpressionVisitor visitor)
at EfficientDynamoDb.FluentCondition.Core.FilterOrWrapper.WriteAttributeValues(DdbWriter& writer, DynamoDbContextMetadata metadata, Int32& valuesCount, DdbExpressionVisitor visitor)
at EfficientDynamoDb.FluentCondition.Core.FilterAndWrapper.WriteAttributeValues(DdbWriter& writer, DynamoDbContextMetadata metadata, Int32& valuesCount, DdbExpressionVisitor visitor)
at EfficientDynamoDb.Internal.Extensions.Utf8JsonWriterExtensions.WriteConditionExpression(DdbWriter& writer, NoAllocStringBuilder& builder, DdbExpressionVisitor visitor, FilterBase condition, DynamoDbContextMetadata metadata)
at EfficientDynamoDb.Internal.Extensions.Utf8JsonWriterExtensions.WriteConditionExpression(DdbWriter& writer, FilterBase condition, DynamoDbContextMetadata metadata)
at EfficientDynamoDb.Internal.Operations.PutItem.PutItemHighLevelHttpContent.WriteDataAsync(DdbWriter ddbWriter)
at EfficientDynamoDb.Internal.Operations.Shared.DynamoDbHttpContent.SerializeToStreamAsync(Stream stream, TransportContext context)
at EfficientDynamoDb.Internal.Operations.Shared.DynamoDbHttpContent.SerializeToStreamAsync(Stream stream, TransportContext context)
at EfficientDynamoDb.Internal.Operations.Shared.DynamoDbHttpContent.CreatePooledContentReadStreamAsync()
at EfficientDynamoDb.Internal.HttpApi.SendAsync(DynamoDbContextConfig config, HttpContent httpContent, CancellationToken cancellationToken)
at EfficientDynamoDb.DynamoDbContext.PutItemAsync[TEntity](BuilderNode node, CancellationToken cancellationToken)
The text was updated successfully, but these errors were encountered: