Updating an abstract list-type property with a default value fails with "unkown error".
See the integration test here and and here
The server log says:
linkahead | java.lang.ClassCastException: class org.caosdb.server.datatype.CollectionValue cannot be cast to class org.caosdb.server.datatype.SingleValue (org.caosdb.server.datatype.CollectionValue and org.caosdb.server.datatype.SingleValue are in unnamed module of loader 'app')
linkahead | at org.caosdb.server.database.backend.transaction.InsertEntityValue.execute(InsertEntityValue.java:48)
linkahead | at org.caosdb.server.database.BackendTransaction.execute(BackendTransaction.java:227)
linkahead | at org.caosdb.server.database.backend.transaction.UpdateEntityTransaction.execute(UpdateEntityTransaction.java:52)
linkahead | at org.caosdb.server.database.BackendTransaction.executeTransaction(BackendTransaction.java:144)
linkahead | at org.caosdb.server.transaction.TransactionInterface.execute(TransactionInterface.java:48)
linkahead | at org.caosdb.server.transaction.WriteTransaction.update(WriteTransaction.java:94)
linkahead | at org.caosdb.server.transaction.WriteTransaction.transaction(WriteTransaction.java:329)
linkahead | at org.caosdb.server.transaction.Transaction.execute(Transaction.java:201)
linkahead | at org.caosdb.server.grpc.EntityTransactionServiceImpl.write(EntityTransactionServiceImpl.java:700)
linkahead | at org.caosdb.server.grpc.EntityTransactionServiceImpl.update(EntityTransactionServiceImpl.java:667)
linkahead | at org.caosdb.server.grpc.EntityTransactionServiceImpl.singleTransaction(EntityTransactionServiceImpl.java:573)
linkahead | at org.caosdb.server.grpc.EntityTransactionServiceImpl.transaction(EntityTransactionServiceImpl.java:559)
linkahead | at org.caosdb.server.grpc.EntityTransactionServiceImpl.multiTransaction(EntityTransactionServiceImpl.java:963)
linkahead | at org.caosdb.api.entity.v1alpha1.EntityTransactionServiceGrpc$MethodHandlers.invoke(EntityTransactionServiceGrpc.java:231)
linkahead | at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:182)
linkahead | at io.grpc.PartialForwardingServerCallListener.onHalfClose(PartialForwardingServerCallListener.java:35)
linkahead | at io.grpc.ForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:23)
linkahead | at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:40)
linkahead | at io.grpc.Contexts$ContextualizedServerCallListener.onHalfClose(Contexts.java:86)
linkahead | at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331)
linkahead | at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:814)
linkahead | at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
linkahead | at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
linkahead | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
linkahead | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
linkahead | at java.base/java.lang.Thread.run(Thread.java:829)
The relevant testing code looks like this (using caosdb-cpplib):
update_entity.SetDataType(AtomicDataType::INTEGER, true);
update_entity.SetValue(std::vector<int32_t>{1, 1, 2, 3, 5, 8, 13});
update_transaction->UpdateEntity(&update_entity);
DoD
-
review and merge !28 (merged) -
review and merge caosdb-pyinttest!12 (merged)
Edited by Daniel Hornung