Skip to content

Change Chat fetch to use top/skip; improve sql

Kovus requested to merge develop into master

SQL queries for this were pulling the entire matching piece of the table, then getting the top 300 lines. This changes that, so that the query for the ChatModel includes the subquery for the ChatMessages. This way the Model.Messages association will just return the appropriate data. Not entirely sure why I have to do .Take(top) before doing .Reverse(); but there's a variation of objects.

Merge request reports