DataHydrator with Redis driver
Closed this issue · 7 comments
Hello,
I want to use the DataHydrator filter (with ORM). I use the Redis driver in my configuration. I tried the following, but it doesn't work :
spy_timeline:
drivers:
redis:
client: snc_redis.default
filters:
data_hydrator:
priority: 20
service: spy_timeline.filter.data_hydrator
filter_unresolved: true
locators:
- spy_timeline.filter.data_hydrator.locator.doctrine_orm
What is wrong ?
Hello,
What does not work ? Have you an exception ?
You should have log of querie via locator, or you can debug on locator to know why it doesn't locate your entities.
With this configuration, my wall displays nothing.
If I delete the 2 locators lines, the wall is displayed but without hydration. In the subject_component block, "model" and "id" are well displayed (\Acme\UserBundle\Entity\User and 3 for example), but "value" is empty.
the wall displays nothing because you have filter_unresolved : true
, it filter actions which have components not located.
And add a dump of count($results);.
I see 2 possible issues:
- Your entities (Acme\UserBundle\Entity\User) are not supported by locator (you can exit on begining of locate method to be sure).
- Your entities cannot be retrieved (dump the $oids array and the results).
With some dumps :
- count($results) = 1
- $oids = array containing 11, which is the id of the direct complement, not the subject (user id) !
When accessing the SF2 toolbar, in the DB panel, I got this error : "An exception has been thrown during the rendering of a template ("SQL Parse Error - Unable to tokenize string at character 73") in DoctrineBundle:Collector:db.html.twig at line 71."
Could you set filter_unresolved
to false
? To know which entities is not loaded ?
If you want, add me to gtalk, it'll be easier: py.stephane1@gmail.com