Skip to content

Instantly share code, notes, and snippets.

@mbriggs
Created May 16, 2012 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbriggs/2711754 to your computer and use it in GitHub Desktop.
Save mbriggs/2711754 to your computer and use it in GitHub Desktop.
test: #keys_for should return array of keys. (Icg::ReferenceDataTableTest):
ActiveRecord::StatementInvalid: PGError: ERROR: operator does not exist: extensions.hstore -> unknown
LINE 1: ...ata_rows"."reference_data_table_id" = 9 AND (data -> 'test_f...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT key FROM "icg_reference_data_rows" WHERE "icg_reference_data_rows"."reference_data_table_id" = 9 AND (data -> 'test_field' = 'AA') ORDER BY key desc
app/models/icg/reference_data_table.rb:70:in `keys_for'
/test/unit/icg/reference_data_table_test.rb:141:in `__bind_1337184784_849713'
Error:
test: #keys_for should return empty array when field does not exist. (Icg::ReferenceDataTableTest):
ActiveRecord::StatementInvalid: PGError: ERROR: operator does not exist: extensions.hstore -> unknown
LINE 1: ...ta_rows"."reference_data_table_id" = 10 AND (data -> 'INVALI...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT key FROM "icg_reference_data_rows" WHERE "icg_reference_data_rows"."reference_data_table_id" = 10 AND (data -> 'INVALID' = 'AA') ORDER BY key desc
app/models/icg/reference_data_table.rb:70:in `keys_for'
/test/unit/icg/reference_data_table_test.rb:152:in `__bind_1337184784_887643'
Error:
test: #keys_for should return empty array when value does not exist. (Icg::ReferenceDataTableTest):
ActiveRecord::StatementInvalid: PGError: ERROR: operator does not exist: extensions.hstore -> unknown
LINE 1: ...ta_rows"."reference_data_table_id" = 11 AND (data -> 'test_f...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT key FROM "icg_reference_data_rows" WHERE "icg_reference_data_rows"."reference_data_table_id" = 11 AND (data -> 'test_field' = 'QQ') ORDER BY key desc
app/models/icg/reference_data_table.rb:70:in `keys_for'
/test/unit/icg/reference_data_table_test.rb:148:in `__bind_1337184784_931490'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment