Closed llermaly closed 7 years ago
Hello, I'm using this gem for my project but when I list "father" relation elements, all childs are loading unnecessary and this makes my system very slow (2k records) .
Models:
instrument belongs_to evaluation evaluation has_many questions
Problem is I'm listing instruments and all questions inside evaluations are being loaded too (+40 per record)
This is the query that gets the records :
def get_raw_records Instrument.includes( :evaluation => [:assignature,:level, :evaluation_type]) .references( :evaluation => [:assignature,:level,:evaluation_type] ).distinct end
Some simpler queries like Instrument.joins(:evaluation) have problems on sorting/ordering.
I hope you guys can help me.
Thanks
Forget it, an action button was doing it.
thanks for this nice plugin!!
Hello, I'm using this gem for my project but when I list "father" relation elements, all childs are loading unnecessary and this makes my system very slow (2k records) .
Models:
instrument belongs_to evaluation evaluation has_many questions
Problem is I'm listing instruments and all questions inside evaluations are being loaded too (+40 per record)
This is the query that gets the records :
Some simpler queries like Instrument.joins(:evaluation) have problems on sorting/ordering.
I hope you guys can help me.
Thanks