createMultipleAnnotations allows you to send a list of annotations for addition to the server. However, in that call, if the annotations contain an _id key/value, it will upload but get confused. I have found, for instance, that connections between the annotations will no longer work. I am guessing this is because it screws up the commit to the database because it has an existing _id but is also trying to assign a new one or something like that. It would be better, I think, to strip any _id keys that are sent to the server via this endpoint.
This came up in the AI worker where I want to get a list of annotations and then send those same annotations back to the server, resulting in strange behavior. When I removed the _id fields from the annotations I sent with createMultipleAnnotations, it worked fine. It's probably good practice to not send the _id fields to this endpoint, but still, I think the server should catch this error.
createMultipleAnnotations allows you to send a list of annotations for addition to the server. However, in that call, if the annotations contain an
_id
key/value, it will upload but get confused. I have found, for instance, that connections between the annotations will no longer work. I am guessing this is because it screws up the commit to the database because it has an existing_id
but is also trying to assign a new one or something like that. It would be better, I think, to strip any_id
keys that are sent to the server via this endpoint.This came up in the AI worker where I want to get a list of annotations and then send those same annotations back to the server, resulting in strange behavior. When I removed the
_id
fields from the annotations I sent with createMultipleAnnotations, it worked fine. It's probably good practice to not send the_id
fields to this endpoint, but still, I think the server should catch this error.