Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 613 Bytes

README.rdoc

File metadata and controls

16 lines (12 loc) · 613 Bytes

Welcome to Rails

This project is to illustrate some weird duplications that can happen when using ‘joins`. These duplications happen when you do a join without selecting something from the joined association. When this happens rails execute a query similar to

“‘ SELECT parents.* FROM parents INNER JOIN children ON children.parent_id = parents.id “`

This will return duplicated ‘parents` rows and rails has no extra information on how to group them while instantiating the `Parent` objects

run the ‘test/unit/parent_test.rb` tests and look at the SQL for details and some ways to work around this issue