When we trying delete using Cassandra.Mapping.Delete<T>
method the application throws an error on execution:
This is a 'Entity(POCO)' class on application:
Table structure in Cassandra database:
Complete exception description:
An exception of type 'Cassandra.SyntaxError' occurred in System.Private.CoreLib.dll but was not handled in user code: 'line 0:-1 no viable alternative at input '''
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Cassandra.Requests.PrepareHandler.d__6.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Cassandra.Requests.PrepareHandler.d__4.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Cassandra.Session.d__54.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Cassandra.Mapping.Statements.StatementFactory.d__8.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Cassandra.Mapping.Mapper.d__38.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Cassandra.Tasks.TaskHelper.WaitToComplete(Task task, Int32 timeout)
What is wrong?
FYI: these links don't solve this problem:
S.O: "no viable alternative at input" error when querying cassndra table
S.O: Cassandra "no viable alternative at input"
[SOLVED]
Thanks @jorgebg, we forgotten to specify the partition key on "Entity" mapping class.