This sounds like you have a bidirectional association: Match is referring to
User and User is referring to Match.
So when you do a dump like yours, the following will be (tried to) displayed:
Match1
-> User1
-> Match1
-> User1
-> Match1
-> User1
-> etc...
This will indeed go on for ever :)
You can use \Doctrine\Common\Util\Debug::dump() to inspect entities and
collections.
--
Jasper N. Brouwer
(@jaspernbrouwer)
On 14 Mar 2014, at 13:42, venyii <[email protected]> wrote:
> Hi guys,
>
> I don´t know if this is a Doctrine problem, but maybe someone here can help
> me solve this anyway :)
>
> If you have a look at the HomeController, you can see my test code.
> Everything is working fine with $match->getUsers() as long as I don´t try to
> dump the result or dump the array copy. It´d run forever if I hadn´t set a
> memory_limit. Sometimes it even fails with a 'Notice: Corrupt member variable
> name'. Seems like a recursion problem?
>
> I tried a 'doctrine standalone' version with those entities and had no
> problems, So could it be a Symfony/configuration issue?
>
> Entities:
> * Match: A match can have multiple attending players/users
> * MatchUser: Holds the relation between Match and User with some
> additional data
> * User: Standard user entity (extended FOS-UB)
> Files:
> * partialoutput.txt: I just dumped the result of
> '$match->getUsers()->toArray()' running endlessly in there (shortened it a
> lot, since it was > 200.000 lines)
> * pgsf.sql: My test database with some data (User: testuser PW: 1234)
> Repo: https://bitbucket.org/venyii/pgsf/src
>
> Let me know if you need any more information and thanks in advance for your
> help!
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.