Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revive doesn't seem to work when using UUID's? #37

Open
brandonparsons opened this issue Aug 27, 2014 · 0 comments
Open

Revive doesn't seem to work when using UUID's? #37

brandonparsons opened this issue Aug 27, 2014 · 0 comments

Comments

@brandonparsons
Copy link


[3] (pry) main: 0> User.deleted.first.revive
  User Load (0.5ms)  SELECT  "users".* FROM "users"  WHERE ("users"."deleted_at" IS NOT NULL)  ORDER BY "users"."id" ASC LIMIT 1
  Questionnaire Load (0.5ms)  SELECT  "questionnaires".* FROM "questionnaires"  WHERE "questionnaires"."user_id" = $1 LIMIT 1  [["user_id", "630b8884-eced-4383-b8fd-0bb61892c033"]]
  Questionnaire Load (0.2ms)  SELECT  "questionnaires".* FROM "questionnaires"  WHERE "questionnaires"."user_id" = $1 LIMIT 1  [["user_id", "630b8884-eced-4383-b8fd-0bb61892c033"]]
  Portfolio Load (0.3ms)  SELECT  "portfolios".* FROM "portfolios"  WHERE "portfolios"."user_id" = $1 LIMIT 1  [["user_id", "630b8884-eced-4383-b8fd-0bb61892c033"]]
  Portfolio Load (0.2ms)  SELECT  "portfolios".* FROM "portfolios"  WHERE "portfolios"."user_id" = $1 LIMIT 1  [["user_id", "630b8884-eced-4383-b8fd-0bb61892c033"]]
  SimulationInput Load (0.4ms)  SELECT  "simulation_inputs".* FROM "simulation_inputs"  WHERE "simulation_inputs"."user_id" = $1 LIMIT 1  [["user_id", "630b8884-eced-4383-b8fd-0bb61892c033"]]
  SimulationInput Load (0.2ms)  SELECT  "simulation_inputs".* FROM "simulation_inputs"  WHERE "simulation_inputs"."user_id" = $1 LIMIT 1  [["user_id", "630b8884-eced-4383-b8fd-0bb61892c033"]]
  Expense Load (6.3ms)  SELECT "expenses".* FROM "expenses"  WHERE "expenses"."id" IN ('all', '---
:conditions:
- ''"expenses".deleted_at > ? AND "expenses".deleted_at < ?''
- 2014-08-27 01:51:35.844663000 Z
- 2014-08-27 01:51:41.844663000 Z
')
PG::InvalidTextRepresentation: ERROR:  invalid input syntax for uuid: "all"
LINE 1: ...ses".* FROM "expenses"  WHERE "expenses"."id" IN ('all', '--...
                                                             ^
: SELECT "expenses".* FROM "expenses"  WHERE "expenses"."id" IN ('all', '---
:conditions:
- ''"expenses".deleted_at > ? AND "expenses".deleted_at < ?''
- 2014-08-27 01:51:35.844663000 Z
- 2014-08-27 01:51:41.844663000 Z
')
ActiveRecord::StatementInvalid: PG::InvalidTextRepresentation: ERROR:  invalid input syntax for uuid: "all"
LINE 1: ...ses".* FROM "expenses"  WHERE "expenses"."id" IN ('all', '--...
                                                             ^
: SELECT "expenses".* FROM "expenses"  WHERE "expenses"."id" IN ('all', '---
:conditions:
- ''"expenses".deleted_at > ? AND "expenses".deleted_at < ?''
- 2014-08-27 01:51:35.844663000 Z
- 2014-08-27 01:51:41.844663000 Z
')
from /Users/brandon/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `async_exec'

Or am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant