php - Lazy loading specific entities in Doctrine 2 -


i have quite trivial question/problem, haven't found satisfiable answer.

i have simple entity in doctrine 2 specifying configuration options (just id, name , value). during rendering different pages throughout code, i'm requesting different configuration options name, results in query each 1 of requests.

but need values in template. want somehow squeeze different calls 1 query, execute , fetch options i've requested. cannot build custom dql because don't know options each page want (and building every combination seems stupid hell me).

i thought naive implementation of weird lazy loading, turns out don't have knowledge in field. there possibility doctrine automatically?

thanks time.

what problem? if don't want call database query in every request, cache queries in redis, memcached, apc etc...
doctrine out of box support eager, lazy , lazy loading related entities another.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -