Created
October 22, 2010 08:42
-
-
Save gravis/640183 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> Event.find(123).participants.ascend_by_number | |
[works] | |
>> Event.find(123).participants.published.all(:order => :number) | |
[works] | |
>> Event.find(123).participants.published.ascend_by_number | |
[returns the whole table until memory is full and server crash] | |
SQL : | |
SELECT * FROM "events" WHERE ("events"."id" = 123) | |
SELECT * FROM "participants" WHERE ("participants"."published" = 't') ORDER BY participants.number ASC | |
=> the WHERE event_id is gone ! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment