Closed ozthegreat closed 6 years ago
You want to disable the dataloader permanently or for specific calls? Specific call support would have to be in dataloader and we could then pass in appropriate options
@mickhansen Specific calls ideally but I guess permanently as well wouldn't be bad to have as an option. From routing round it looks likes it's disabled if it's inside a transaction anyway?
Permanently is likely to ruin your performance as we're definitely moving away from doing prefetching.
@mickhansen You're not wrong. BUT all our queries are behind redis so our DB queries can take the hit. And, more importantly, because we're joining on two fields data loading just doesn't work in the current form. Would have to be changed from WHERE post_id IN (1,2,3,4)
to something like WHERE (post_id = 1 and uni_id = 5) OR (post_id = 2 and uni_id = 3) etc etc
@ozthegreat Definitely open for a way to disable the dataloader completely.
Hey hey. One of our associations does a join based on two fields. With the data loading this then tries to translate it to an
IN
with just one field which obviously won't work. Would be good to be able to pass an option that disables the data-loading. From a quick scout through the code the underlaying lib does have abatchLoad
option that can be set to false