symfony/symfony — Issue #2659: [Twig][Doctrine] Using "join" on ManyToMany property
Author: althaus
Created: 2011-11-16 12:39:36+00:00
State: open

Hey there,

I'm unsure where to file this issue as I cannot decide whom to blame.

If you're have a simple entity like this (only relevant code shown):

```php
title;
}
}
```

If you now try to join this in a Twig template...

```twig
{{ project.customers|join(' ') }}
```

... you're getting an exception thrown:

```
Method FooBundle\Entity\Project::__toString() must not throw an exception
```

As the join filter just calls an implode on the value, I tried a simple test case with a minimal class setup and it doesn't fail. ?:-|

Could this somehow be related to the generated proxies? I'm not the only one with this issue: http://forum.symfony-project.org/viewtopic.php?f=23&t=37846

Thanks for some light on this
Matthias