Skip to content

Fix eagerly loading associations without primary keys #4976

Merged
merged 2 commits into from Sep 7, 2012

4 participants

@kreynolds

column_names_with_alias allowed a nil through when used with associations without primary keys which breaks eager loading in some circumstances.

@jeremyf
jeremyf commented on 6050d01 May 3, 2012

@tenderlove @jonleighton the tests all pass

@jeremyf
jeremyf commented May 3, 2012

@jonleighton @tenderlove – the tests pass.

@jonleighton
Ruby on Rails member

Could you just unit-test the JoinPart object to make sure that the column_names_with_alias returns the right thing? What we've got here is an integration test which is unnecessary.

@frodsan
frodsan commented Jul 4, 2012

@kreynolds any news on this pr?

@kreynolds

I somehow missed the most recent comment putting the ball back in my court, I'll try to get to this in the next day or two

@kreynolds

There are no other tests for the join_dependency section of AR so I made a new file with a minimal unit test in it and removed the integration test.

@kreynolds

@jonleighton Is there anything additional this PR requires?

@jonleighton jonleighton merged commit e20a790 into rails:master Sep 7, 2012
@jonleighton
Ruby on Rails member

Merged, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.