I would not say that this is a good practice. Now you must synchronize this additional key with the same key on the parent object, and the data is not as normalized as it could be.
I would not go this way if you have no reason for this.
If the reason is that it is difficult for you to continue to browse through the model hierarchy in order to go to the corresponding user models, then perhaps there is a better way to express this code so that you do not have to continue to do so many searches / connections?
If this is mainly for performance reasons, there may be better solutions β caching, database indexes, and other methods that may help.
If you add an additional key, this is the best / easiest solution for what you are trying to do, and then excellent. I would just think if there is a better way first.
source share