is there a way to remove an (optional) attribute from an existing document when doing :db/op :update with biff/submit-tx? setting the attribute to nil does not work and fails validation. I suppose one could possibly have malli accept nil.. but that doesnt seem so elegant; nor is it sustainable if one were to have many such attributes / cases where updates could involve removing attributes
you can set the value to :db/dissoc, see the transaction reference about 2/3 down: https://biffweb.com/docs/reference/transactions/
I see. Thank you! Didnt know that. It just occurred to me that I could use / try :db/op :put as well; and it looks like it would work. If the attribute is not set, the document does not end up with that attribute. I assume this works as well?
yes, that approach would work too. if you have two simultaneous requests that both do a put operation on the same document though, one of the puts might get overwritten
:db/update ensures that concurrent writes don't get lost
I see. Thank you!