I have a postgres 9.3, Rails 4.0.2 app running on jRuby using edge.
Edge works well in most places except for a table that has JSON type rows. When I try to run 'with_descendants' I get the follow error:
ActiveRecord::StatementInvalid: ActiveRecord::JDBCError: org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type json
It generates the following SQL query:
Position: 142: SELECT "application_documents".* FROM "application_documents" WHERE "application_documents"."id" = (WITH RECURSIVE "all_nodes" AS ( SELECT "application_documents".* FROM "application_documents" UNION SELECT "application_documents"."id", "application_documents"."app_type", "application_documents"."name", "application_documents"."state", "application_documents"."carrier", "application_documents"."esignature", "application_documents"."pdf_file_name", "application_documents"."pdf", "application_documents"."created_at", "application_documents"."updated_at", "application_documents"."annotations", "application_documents"."schema", "application_documents"."parent_id" FROM "application_documents" INNER JOIN "all_nodes" ON "application_documents"."parent_id" = "all_nodes"."id" ) SELECT id FROM "all_nodes") ORDER BY "application_documents"."id" ASC LIMIT 1
With the "schema" & "annotations" columns being JSON.
I have a postgres 9.3, Rails 4.0.2 app running on jRuby using edge.
Edge works well in most places except for a table that has JSON type rows. When I try to run 'with_descendants' I get the follow error:
It generates the following SQL query:
With the "schema" & "annotations" columns being JSON.