EFCore.Cassandra icon indicating copy to clipboard operation
EFCore.Cassandra copied to clipboard

Error when pass nullable value.

Open RiddlerKnight opened this issue 4 years ago • 1 comments

Table model

public class ExModel
{
  public int ID {get;set;}
  public string Name {get;set;}
  public decimal? TotalExpenses {get;set;}
}
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
 ---> Cassandra.InvalidTypeException: Unknown Cassandra target type for CLR type System.DBNull
   at Cassandra.Serialization.GenericSerializer.Serialize(ProtocolVersion version, Object value)
   at Cassandra.Serialization.Serializer.Serialize(Object value)
   at Cassandra.FrameWriter.WriteAsBytes(Object value)
   at Cassandra.QueryProtocolOptions.Write(FrameWriter wb, Boolean isPrepared)
   at Cassandra.Requests.ExecuteRequest.WriteBody(FrameWriter wb)
   at Cassandra.Requests.BaseRequest.WriteFrame(Int16 streamId, MemoryStream stream, ISerializer connectionSerializer)
   at Cassandra.OperationState.WriteFrame(Int16 streamId, MemoryStream memoryStream, ISerializer serializer, Int64 timestamp)
   at Cassandra.Connections.Connection.RunWriteQueueAction()

I'm not sure this error is happen from this lib or Cassandra driver.

RiddlerKnight avatar Aug 29 '21 06:08 RiddlerKnight

Hello,

Sorry for the delayed response. The issue is fixed in the branch "release/3.0.0" :)

Kind regards,

SimpleIdServer

simpleidserver avatar Sep 19 '21 15:09 simpleidserver