googleapis/dotnet-spanner-entity-framework

DataReader.GetFieldValue<T> fails for arrays containing null elements in read/write transaction

Closed this issue · 0 comments

Calling DataReader.GetFieldValue<T>(int) for a column that contains an array and where the array contains at least one NULL element in a read/write transaction will fail. The reason behind this is that the DataReaderWithChecksum implementation does not override the method implementation of System.Data.Common.DbDataReader, and the latter looses the type information. This again causes the Cloud Spanner client to use the default type for the column, and the default type for for example an ARRAY<INT64> is List<long> (and not List<long?>), which again cannot hold any null values.