Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@hypolite From a database perspective it is really bad practice to store data that is already stored. In this case it is especially bad since there are depending tables (like the one with the reported posts) that with each update is deleted and inserted over and over again.
Also when this technique was applied to some other places that have got a higher risk of race conditions we run into nightmare situations where some fields had been reverted to older situations because there had been some other (parallel) task between setting the class variables and saving all the fields. Let's say we had a situation where the one process set the avatar of a contact and a parallel process is setting the date of the last item. With the right (or better: bad) timing, the avatar or the date of last item was reverted when we worked that way.
I do get your point of input validation. But that solution opens up a bunch of other problems that are even worse than the original problem.