KnpLabs/knp-components — pull request #117 by xrash (2014-10-08 00:37:42+00:00)
Title: Update the CompositeKeyTest to use a populated schema.

I was facing a bug while paginating a Doctrine entity that had a composite primary key and getting this exception:

Single id is not allowed on composite primary key in entity [...]

After poking in the code, I actually found that the exception was being thrown by Doctrine, and there was already a test for that. To my amusement, the test was passing. I tried to do in my code exactly what the test was doing, but no dice.

So I poked a little bit more and discovered that the CompositeKeyTest was running with an empty schema, and that's why it succeded and my code didn't. It took me to just populate the testing schema with some fixtures for the test to fail just like my code.

After a while, I was able to make it work using some crazy hint which I am not sure if it works generally, but worked for me.

Can you guys help to check if those changes make sense at all?

Thanks!