-
Hi! mst noob here. I've done some googling around, and I'm still stuck so I'm hoping that you might be able to help me. atm I have a very naive trigger to save model updates. It looks like this:
This mostly works fine, but it does have the odd side effect that when the model is loaded from the database it will immediately save again, which isn't ideal. Is there a way for me to tell the 'source of creation' somehow? Or should I be testing for something different? I thought about adding a flag to the model to say what last caused it to update, but that feels hacky. Or am I just going about this the wrong way entirely? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Move |
Beta Was this translation helpful? Give feedback.
Move
onSnapshot
out ofafterCreate
.