I also had to implement recursive comments. I broke my head with a nested model, let me explain why:
Let's say you need comments on the article. Let's call root comments comments directly related to this article. Allows you to respond to comment comments that are a response to another comment.
I noticed (unfortunately) that I wanted the comments of the root to be ordered by desc date, BUT I wanted the comments to be sent on a date from the date !! Paradoxically !!
Thus, the nested model did not help me reduce the number of queries.
Here is my solution:
Create a comment table with the following fields:
ID
article_id
parent_id (nullable)
date_creation
Email
whateverYouLike
sequence
Depth
3 key fields of this implementation: parent_id, sequence and depth. parent_id and depth help insert new nodes.
Consistency is a real key field, it is a kind of emulation of a nested model.
Each time you insert a new root comment, it is a multiple of x. I choose x = 1000, which basically means that I can have 1000 maximum nested comments (this is the only drawback I found for this system, but this limit can be easily changed, this is enough for my needs now).
The most recent root comment should be with the highest sequence number.
Now answer the comments: we have two cases: the answer for the root comment or the response for the comment.
In both cases, the algorithm is the same: take the parent sequence and get it to get the sequence number. Then you need to update the sequence numbers that are below the parent sequence and above the base sequence, which is the sequence of root comments just below the corresponding root comment.
I do not expect you to understand all this, because I am not a very good explanator, but I hope this can give you new ideas. (At least this worked better for me than the nested model: = fewer queries, which is the real goal).