avram icon indicating copy to clipboard operation
avram copied to clipboard

Preloads fail silently when given incorrect query

Open BrucePerens opened this issue 4 years ago • 0 comments

I gave a preload an incorrect query, in an ill-considered attempt to optimize:

preload_locations(LocationQuery.new.preload_url_path(URLPathQuery.new.limit(1))

The limit(1) is incorrect, preload_locations will retrieve more than one object. The result was an object with @_url_path_preloaded=true, and @_preloaded_url_path=nil, and no complaint from the preload code.

BrucePerens avatar Feb 05 '21 19:02 BrucePerens