X Tutup
The Wayback Machine - https://web.archive.org/web/20200906104859/https://github.com/ClosureTree/closure_tree/issues/342
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

Problem with uuids as primary keys #342

Open
suung opened this issue Feb 21, 2019 · 1 comment
Open

Problem with uuids as primary keys #342

suung opened this issue Feb 21, 2019 · 1 comment

Comments

@suung
Copy link

@suung suung commented Feb 21, 2019

Hey

Sorry, I don't know how to go further here, i found uuid support in the changelog, but yet

(byebug) parent_task.children.create(user_id: parent_task.user.id, workflow_id: parent_task.workflow.id)
*** ActiveRecord::StatementInvalid Exception: PG::UndefinedFunction: ERROR:  operator does not exist: uuid = integer
LINE 5: WHERE x.descendant_id = 72337
                              ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
: INSERT INTO "task_hierarchies"
  (ancestor_id, descendant_id, generations)
SELECT x.ancestor_id, '2cd4eac4-322c-47d7-91a9-73cf95eead48', x.generations + 1
FROM "task_hierarchies" x
WHERE x.descendant_id = 72337

rails 5.2.2
closure_tree-7.0.0

I will appreciate every help very much

@joaocvalerio
Copy link

@joaocvalerio joaocvalerio commented Sep 29, 2019

did you run Task.rebuild!?

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
X Tutup