-
I cannot for the life of me understand what I'm doing wrong. I have a model that looks essentially like this
My API for updating a document looks like
I have confirmed that the setter is not firing no matter what I change on the document. I can't understand what I'm doing wrong here. Any help would be appreciated. This seems to be a difficult concept for me to grasp. I basically am trying to create the value for the key whenever the user updates/creates the document. If I'm going about this the wrong way, please tell me how I should be approaching this. I'm using this in a MERN application with RTK Query if that helps. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Can you print out what is the value of |
Beta Was this translation helpful? Give feedback.
I ended up just reworking it to use virtuals instead. I guess setters can't access values outside of their own. The virtuals are fine, though, as it's not actually needed to be stored and just displayed.