Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ProxyReferenceRepository fatal error when serializing object without getId() method #93

johnkary opened this Issue Mar 17, 2013 · 4 comments


None yet
3 participants

I'm using doctrine/data-fixtures as part of using ICBaseTestBundle. I'm using ICBaseTestBundle's getFixtureList() functionality to load some fixtures prior to executing a test case.

The entity whose fixtures I'm loading does not have a getId() method because my primary key field is mapped to another property (e.g. private $code; instead of private $id;), so it doesn't make sense to expose a getId() method because that means nothing to my entity.

Could ProxyReferenceRepository use another way to find the primary key(s) used by the given entity (maybe via UOW) instead of calling getId()?

On a slightly related note, I was going to try writing a failing test for this but ran into the test suite exhausting available memory above memory_limit=2G on test Doctrine\Tests\Common\DataFixtures\DependentFixtureTest::test_orderFixturesByDependencies_circularReferencesMakeMethodThrowCircularReferenceException using PHPUnit 3.7.9 installed via PEAR w/o xDebug. PHPUnit 3.7.14 installed via composer had issues with using Composer dev-master's autoloader.

Issue exists as of eef10f6
Issue appears to occur here:

$simpleReferences[$name] = array($className, $reference->getId());

ddeboer commented Oct 10, 2013

I'm having the same problem. Any progress on this?


guilhermeblanco commented Oct 10, 2013

Will look into this one tomorrow. =)


guilhermeblanco commented Oct 10, 2013

Fixed as of 8ffac1c

Very nice, thanks Guilherme!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment