Closed marcinadd closed 5 years ago
Since the app uses ORM, a better option for me is to add private Message replyToMessage
to Message class. We assume that one message can have one reply. Then you can to the repository something to get all messages where replyToMessage is null and you will get beautifully grouped messages. This is only my suggestion I don't know if it is the best. However, maybe you will have better ones.
I can probably do this.
@marcinadd what do you have in mind here? The simpliest thing I can think of is adding a
replyToId
on theMessage
.A different approach would be to create a different construct for "Thread" that will group messages once a reply happens.