1

I have a problem. I need to use GET blueprints and I would like to receive all (without a limit) of my Models objects (think in one Model called Student). So, to do that I added in sails.config.blueprints the attribute parseBlueprintOptions and set queryOptions.criteria.limit to MaxInteger (I saw that in this URL: https://sailsjs.com/documentation/reference/configuration/sails-config-blueprints#?using-parseblueprintoptions). But when I go to a production environment I received the next message:

Warning: Attempting to populate 'grupos' with the specified subcriteria, but this MAY NOT BE SAFE, depending on the number of records stored in your models. Since this association does not support optimized populates (i.e. it spans multiple datastores, or uses an adapter that does not support native joins), it is not a good idea to populate it along with a subcriteria that uses 'limit', 'skip', and/or 'sort'-- at least not in a production environment.

This is because, to satisfy the specified 'limit'/'skip'/'sort', many additional records may need to be fetched along the way -- perhaps enough of them to overflow RAM on your server.

If you are just using sails-disk during development, or are certain this is not a problem based on your application's requirements, then you can safely ignore this message. But otherwise, to overcome this, either (A) remove or change this subcriteria and approach this query a different way (such as multiple separate queries or a native query), or (B) configure all involved models to use the same datastore, and/or switch to an adapter like sails-mysql or sails-postgresql that supports native joins. [?] See https://sailsjs.com/support for help.

What can I do? I'd like to ignore this message or solved it but I don't know how.

NOTE: I'm using Sails v1.0.1.

Lucas Penén
  • 41
  • 2
  • 6

1 Answers1

0

Try updating to the latest version of Sails: v1.0.2.

Further reading on the latest features / info of Sails Blueprint GET can be found here: https://sailsjs.com/documentation/reference/blueprint-api/find-where

johnabrams7
  • 399
  • 2
  • 10