Exercise/FOQElasticaBundle — Issue #52: ODM Reference Mapping
Author: omm
Created: 2011-12-21 21:01:37+00:00
State: open

I have two documents defined in Doctrine Mongo ODM: Item and Category.
They are related through the field "categories" in the Item document, which is defined as a ReferenceMany, i.e. an Item can have many Categories.

The problem is I can't manage to have FOQElasticaBundle index it right. If I try to map the categories field, running foq:elastica:populate results this error message:

> Catchable Fatal Error: Object of class Proxies\PWCategoryBundleDocumentCategoryProxy could not be converted to string in ...vendor/bundles/FOQ/ElasticaBundle/Transformer/ModelToElasticaAutoTransformer.php line 74

How do I get elastica to index the referenced documents?
Are references not supported in ElasticaBundle, or am I missing out on something?