Smart relationship paging problem

I have a many smart relationships but I never had one that returned more than 1 page of records. I do have one now that returns 18 records.

Expected behavior

Have 2 pages of records, first one with 15 second one with 3

Actual behavior

Only 15 are returned with 1 page. Can see that the return meta field is set to 15.

Failure Logs

When I query the object in the relation directly and filter by the relationship key, forest calls collection/count and I get the correct
{count: 18}


Please provide any relevant information about your setup.

  • Package Version: 6.1.4
  • Express Version: 4.17.1
  • Sequelize Version:
  • Database Dialect: Mongooose
  • Database Version:
  • Project Name:

Hi @Liam_Cheung,

I think this issue comes from your Smart Has Many Relationship controller implementation.
Did you consider the page.size and page.number query parameters?

Here is the right link in the documentation to use those parameters properly:

Let me know if it does not help.

I had not noticed that the documentation for this type has changed. I will implement it this way.