Kaminari和PG :: UndefinedFunction:错误:无法为类型点

时间:2015-08-30 19:10:47

标签: ruby-on-rails postgresql point kaminari pg

我有两个模型:CountryResortResort具有类型为“point”的字段点。 模型Country has_many Resort s。 当我得到国家度假村与kaminari(.page(params [:page])。每(20)) 我有一个错误:

PG::UndefinedFunction: ERROR:  could not identify an equality operator for type point
LINE 1: SELECT  DISTINCT "resorts".* FROM "resorts" INNER JOIN "coun...
                         ^
: SELECT  DISTINCT "resorts".* FROM "resorts" INNER JOIN "country_resorts" ON "resorts"."id" = "country_resorts"."resort_id" WHERE "country_resorts"."country_id" = $1 AND "country_resorts"."what" = $2 LIMIT 20 OFFSET 0
PG::UndefinedFunction: ERROR:  could not identify an equality operator for type point
LINE 1: SELECT  DISTINCT "resorts".* FROM "resorts" INNER JOIN "coun...

如果我得到没有kaminari的度假村,我会得到正常的结果。

我如何解决这个问题?

0 个答案:

没有答案