eager-loading


Eager loading for globalize2 translations


i have 2 models - Issue and Answers (issue has many answers) and both have translations with globalize2. Every time i attempting to load Issue with answers via
#issue = Issue.find(params[:id])
#answers = #issue.answers
causes loading of translations for each Answer (1 sql query per Answer).
How can i optimize it?
Solved with
#answers = #issue.answers.all(:include => :translations)
#answers = #issue.answers.all(:include => :answer_translations)

Related Links

How to enable eager loading on a association in phpactiverecord?
Rails eager loading with conditions
Rails eager loading and conditions
Eager loading for globalize2 translations

Categories

HOME
opengl
redmine
kivy
nsview
iverilog
websocket
gallery
mosquitto
haxe
native-base
hspi
swarm
spring-security-oauth2
migrate
match
sonata
mahout-recommender
angular2-highcharts
fido-u2f
batch-rename
uislider
eclipse-emf
cell
dragula
jstree
webviewclient
spreadsheetgear
django-import-export
credit-card
d3.js-v4
tightvnc
netbios
steam-web-api
winrm
java-stream
polyml
mars-simulator
sspi
rdp
word-cloud
dagger
flume-twitter
liteide
sonarqube5.2
hibernate-ogm
node-apn
extjs4.1
subforms
aurelia-fetch-client
fitbit
oracle-fusion-apps
boost-compute
yargs
cefpython
bigdecimal
thread-exceptions
msbuild-4.0
fragmentstatepageradapter
powerpoint-2013
simian
utf-16
flush
grinder
deeplink
ibm-was
highest
pythonxy
wlanapi
green-threads
baseadapter
device-admin
xml-signature
back
quantify
ecos
treeline
mfmessagecomposeview
refit
jms-serializer
strcmp
ggts
notifyjs
mp4parser
coalesce
web-frameworks
2d-vector
xcode4.5
jdom
algol68
dropshadow
wcf-callbacks
n-queens
infopath-2007
directshow.net
eaccelerator
eventaggregator
3270
processors
data-retrieval
icon-language

Resources

Encrypt Message