fenos / Rally

Follow, Let Follow you, Follow with Rally, for Laravel 4.*

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostgreSQL support

Atorich opened this issue · comments

Method listFollowers throws an exception:

1) TestFollowerService::testGetFollowers
Illuminate\Database\QueryException: SQLSTATE[42803]: Grouping error: 7 ERROR:  column "followers.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: select "followers".*, "fol"."followed_id" as "is_fan" from "...
               ^ (SQL: select "followers".*, "fol"."followed_id" as "is_fan" from "followers" left join "followers" as "fol" on "fol"."follower_id" = "followers"."followed_id" and "fol"."followed_id" = "followers"."follower_id" where "followers"."followed_type" = User and "followers"."followed_id" = 10 group by "followers"."follower_id", "fol"."follower_id" order by "created_at" desc limit 50)

/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Connection.php:625
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Connection.php:301
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Connection.php:617
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Connection.php:581
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1359
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1349
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1336
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:411
/home/ator/PhpstormProjects/questions/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:151
/home/ator/PhpstormProjects/questions/vendor/fenos/rally/src/Fenos/Rally/Repositories/RallyPolymorphicRepository.php:149
/home/ator/PhpstormProjects/questions/vendor/fenos/rally/src/Fenos/Rally/Rally.php:195
/home/ator/PhpstormProjects/questions/app/components/following/src/stc/following/RallyFollowingProvider.php:46
/home/ator/PhpstormProjects/questions/app/components/following/src/stc/following/FollowerService.php:31
/home/ator/PhpstormProjects/questions/app/tests/TestFollowerService.php:52

Related issue on stackoverflow:
http://stackoverflow.com/questions/16012818/postgresql-grouping-error

Thanks for submitting the issue I will fix soon as possible. Thanks

I am using version 1.0.11 and just noticed that the issue still exists. Since my laravel skills are on a low level, I kindly want to ask if there is any fix to be expected? Many thanks!

Yes sure any pull requests are welcome.