simpleidserver / EFCore.Cassandra

Entity Framework Core provider for Cassandra
Apache License 2.0
35 stars 16 forks source link

Error when pass nullable value. #25

Open RiddlerKnight opened 3 years ago

RiddlerKnight commented 3 years ago

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.

simpleidserver commented 2 years ago

Hello,

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

Kind regards,

SimpleIdServer