# ElasticaBundle and ORM join

**URL:** <https://discuss.elastic.co/t/elasticabundle-and-orm-join/8232>\
**Category:** Elasticsearch\
**Created:** [June 26, 2012, 10:24pm UTC](https://discuss.elastic.co/t/elasticabundle-and-orm-join/8232 "2012-06-26T22:24:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicoB](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicob/32/2969_2.png) [@NicoB](https://discuss.elastic.co/u/NicoB)\
**Post date:** [June 26, 2012, 10:24pm UTC](https://discuss.elastic.co/t/elasticabundle-and-orm-join/8232/1 "2012-06-26T22:24:30Z")

</div>

Hi,

I try to use ElasticaBundle with this config in Symfony2 :

```
                mappings:
                    location: {type: geo_point}
                    user:
                      type: object
                      fields:
                        id: {}
                        firstName: { type: string }
                persistence:
                    driver: orm
                    model: CoreBundle\Entity\MyEntity
                    provider:
                        query_builder_method:

```

createIsActiveQueryBuilder

My object have many relations that I want to index.

But with this config, I recover just the \_\_toString of user, like  
this:  
{"location":"47.2711117,6.0282445","user":"Johan"}

Not the properties, so the only way to recover the full relationship  
object is to do this :  
mappings:  
location: {type: geo\_point}  
user.id: {}  
user.firstName: { type: string }

that store this :  
{"location":"47.2711117,6.0282445","user.id":  
14985,"user.firstName":"Johan"}

but it's not good for do elastic request, I just want the  
representation of my object, and compatible with oneToMany relations :  
{"location":"47.2711117,6.0282445","user"{"id":  
14985,"firstName":"Johan"}}

If somebody have already do this with this Bundle and Doctrine2,  
thanks

Nico

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:22am UTC](https://discuss.elastic.co/t/elasticabundle-and-orm-join/8232/2 "2017-07-06T03:22:25Z")

</div>

Closed on July 6, 2017, 3:22am UTC


