Suppose I have the following entities:
And want to query for Cars that a Driver drove in:
I expect to get an array with an index 'driverRides' with an array of Cars (depending on the data of course).
Just an array with Driver data.
When I started doing some testing I found out I get a different result when I add a third column to the DriverRide table that isn't part of the composite primary key.
Now I did get a 'driverRides' array, but with just a single row and not three as I expected to get in my case.
When I removed the composite key and used an auto-generated id-column, everything worked as expected.
Some test data you might want to use: