Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #584

Closed
Open
Created Mar 23, 2012 by Administrator@rootOwner

note's `noteable_id` issue when running on PostgreSQL

Created by: linjunpop

The log:

  CACHE (0.0ms)  SELECT COUNT(*) FROM "users_projects" WHERE "users_projects"."project_id" = 1 AND "users_projects"."user_id" = 2 AND "users_projects"."project_access" IN (40)
  Note Load (0.7ms)  SELECT "notes".* FROM "notes" WHERE "notes"."noteable_id" = 5 AND "notes"."noteable_type" = 'Issue'
PGError: ERROR:  operator does not exist: character varying = integer
LINE 1: ...otes".* FROM "notes"  WHERE "notes"."noteable_id" = 5 AND "n...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT "notes".* FROM "notes"  WHERE "notes"."noteable_id" = 5 AND "notes"."noteable_type" = 'Issue'
  Rendered issues/show.html.haml within layouts/project (11.0ms)
Completed 500 Internal Server Error in 24ms

ActionView::Template::Error (PGError: ERROR:  operator does not exist: character varying = integer
LINE 1: ...otes".* FROM "notes"  WHERE "notes"."noteable_id" = 5 AND "n...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT "notes".* FROM "notes"  WHERE "notes"."noteable_id" = 5 AND "notes"."noteable_type" = 'Issue'):
    16: 
    17:     %br
    18:     - if @issue.upvotes > 0
    19:       .upvotes#upvotes= "+#{pluralize @issue.upvotes, 'upvote'}"
    20:       
    21: 
    22: .back_link
  app/models/issue.rb:51:in `upvotes'
  app/views/issues/show.html.haml:19:in `_app_views_issues_show_html_haml___527772461796785531_54232600'
  app/controllers/issues_controller.rb:61:in `show'
Assignee
Assign to
Time tracking