Created
June 20, 2013 21:20
-
-
Save rizen/5826749 to your computer and use it in GitHub Desktop.
what happened
This file contains 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
The contestentries table has a 1:1 relationship with games table via a foreign key called game_id in the contestentries table. | |
This works: | |
$db->resultset('ContestEntry')->search(undef,{order_by => [{ -desc => 'crafter_points'}, { -asc => 'me.date_created' }]}); | |
This results in the "game" relationships being undef: | |
$db->resultset('ContestEntry')->search(undef,{order_by => [{ -desc => 'crafter_points'}, { -asc => 'me.date_created' }], prefetch => 'game'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just in case you didn't see my tweet-ply for some reason: https://twitter.com/ribasushi/status/347832508710256641