René's URL Explorer Experiment


Title: Include a inverse polymorphic return a relationship error · Issue #1473 · JSONAPI-Resources/jsonapi-resources · GitHub

Open Graph Title: Include a inverse polymorphic return a relationship error · Issue #1473 · JSONAPI-Resources/jsonapi-resources

X Title: Include a inverse polymorphic return a relationship error · Issue #1473 · JSONAPI-Resources/jsonapi-resources

Description: I try to upgrade JR from v0.9 to the last commit of v-0-11-dev branche. I have found a problem (maybe a bug) when I want to include the polymorphic relation. I have two tables: articles comments (with commentable_id and commentable_type ...

Open Graph Description: I try to upgrade JR from v0.9 to the last commit of v-0-11-dev branche. I have found a problem (maybe a bug) when I want to include the polymorphic relation. I have two tables: articles comments (w...

X Description: I try to upgrade JR from v0.9 to the last commit of v-0-11-dev branche. I have found a problem (maybe a bug) when I want to include the polymorphic relation. I have two tables: articles comments (w...

Opengraph URL: https://github.com/JSONAPI-Resources/jsonapi-resources/issues/1473

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Include a inverse polymorphic return a relationship error","articleBody":"I try to upgrade JR from v0.9 to the last commit of v-0-11-dev branche. I have found a problem (maybe a bug) when I want to include the polymorphic relation.\n\nI have two tables:\n- articles\n- comments (with `commentable_id` and `commentable_type` columns for polymorphic relation)\n\nWhen I try to get articles?include=comments, JR return a relationship error.\n\nBecause in first step it find the articles in SQL Query:\n```SQL\n SELECT articles.* FROM \"articles\" ORDER BY articles.id asc\n```\nAnd in second time, it try to find comments with the inverse relationship, with this Rails code:\n```\nComment.joins(:articles)\n```\nBut this relation not exists. And I don't want to create it because I want to find comments from Articles like:\n```\nArticle.include(:comments)\n```\n\n**Why this new JR strategy to find relation is inverted now ?**\n\nI search how we can fix this problem but I would like some help :D\n\n# Steps to Reproduce\n\nRuby: 3.3.6\nRails: 7.1.5\nJR: branch v0-11-dev\n\nGemfile\n```ruby\ngem \"jsonapi-resources\",\n    git: \"https://github.com/cerebris/jsonapi-resources\",\n    branch: \"v0-11-dev\"\n```\n\nCreate tables in migration\n```ruby\nclass AddTables \u003c ActiveRecord::Migration[7.1]\n  def change\n    create_table :articles do |t|\n      t.string :title\n    end\n\n    create_table :comments do |t|\n      t.string :content\n      t.references :commentable, polymorphic: true, index: true\n    end\n  end\nend\n```\n\nArticle Model\n```ruby\nclass Article \u003c ApplicationRecord\n  has_many :comments, as: :commentable\nend\n```\nArticle Resource\n```ruby\nclass Api::V1::ArticleResource \u003c JSONAPI::Resource\n  attributes :title\n  has_many :comments, exclude_links: :default, foreign_key_on: :related\nend\n```\n\nComment Model\n```ruby\nclass Comment \u003c ApplicationRecord\n  belongs_to :commentable, polymorphic: true\nend\n```\nComment Resource\n```ruby\nclass Api::V1::CommentResource \u003c JSONAPI::Resource\n  attributes :content\n  has_one :commentable, polymorphic: true, exclude_links: :default, polymorphic_types: ['Article']\nend\n```\n\nCreate routes in config/routes.rb\n```ruby\nnamespace :api do\n    namespace :v1 do\n      jsonapi_resources :articles\n      jsonapi_resources :comments\n    end\n  end\n```\n\nNow I want to get the articles and include comments with:\n`http://localhost:3000/api/v1/articles?include=comments`\n\nBut this get return this following error:\n```\nInternal Server Error: Can't join 'Comment' to association named 'article'; perhaps you misspelled it? \n```\n\u003cdetails\u003e\n\u003csummary\u003eToggle to see the full backtrace\u003c/summary\u003e\n```\nInternal Server Error: Can't join 'Comment' to association named 'article'; perhaps you misspelled it? /Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/associations/join_dependency.rb:225:in `find_reflection'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/associations/join_dependency.rb:230:in `block in build'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/associations/join_dependency.rb:229:in `each'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/associations/join_dependency.rb:229:in `map'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/associations/join_dependency.rb:229:in `build'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/associations/join_dependency.rb:73:in `initialize'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/relation/query_methods.rb:1494:in `new'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/relation/query_methods.rb:1494:in `construct_join_dependency'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/relation/query_methods.rb:1723:in `build_joins'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/relation/query_methods.rb:1581:in `build_arel'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/relation/query_methods.rb:1490:in `arel'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation/join_manager.rb:86:in `get_join_arel_node'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation/join_manager.rb:188:in `block (2 levels) in perform_joins'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation/join_manager.rb:175:in `each'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation/join_manager.rb:175:in `block in perform_joins'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation/join_manager.rb:174:in `each'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation/join_manager.rb:174:in `perform_joins'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation/join_manager.rb:48:in `join'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation_retrieval.rb:696:in `apply_joins'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation_retrieval.rb:663:in `apply_request_settings_to_records'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation_retrieval.rb:342:in `find_related_fragments_from_inverse'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/active_relation_retrieval.rb:302:in `find_included_fragments'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/resource_tree.rb:85:in `block in load_included'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/resource_tree.rb:77:in `each_key'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/resource_tree.rb:77:in `load_included'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/resource_tree.rb:140:in `block in complete_includes!'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/3.3.0/set.rb:501:in `each_key'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/3.3.0/set.rb:501:in `each'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/resource_tree.rb:140:in `complete_includes!'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/resource_tree.rb:120:in `initialize'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/processor.rb:387:in `new'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/processor.rb:387:in `find_resource_tree'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/processor.rb:370:in `find_resource_set'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/processor.rb:63:in `find'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/processor.rb:36:in `block (2 levels) in process'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:101:in `run_callbacks'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/processor.rb:35:in `block in process'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:101:in `run_callbacks'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/processor.rb:34:in `process'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/operation.rb:14:in `process'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:148:in `process_operation'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:122:in `block (3 levels) in execute_request'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:109:in `each'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:109:in `block (2 levels) in execute_request'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:101:in `run_callbacks'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:108:in `block in execute_request'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:140:in `process_operations'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:107:in `execute_request'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:86:in `process_request'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/bundler/gems/jsonapi-resources-d3c094b46a38/lib/jsonapi/acts_as_resource_controller.rb:21:in `index'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/abstract_controller/base.rb:224:in `process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_controller/metal/rendering.rb:165:in `process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/abstract_controller/callbacks.rb:259:in `block in process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:121:in `block in run_callbacks'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/turbo-rails-2.0.13/lib/turbo-rails.rb:24:in `with_request_id'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/turbo-rails-2.0.13/app/controllers/concerns/turbo/request_id_tracking.rb:10:in `turbo_tracking_request_id'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actiontext-7.1.5.1/lib/action_text/rendering.rb:23:in `with_renderer'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actiontext-7.1.5.1/lib/action_text/engine.rb:69:in `block (4 levels) in \u003cclass:Engine\u003e'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:130:in `instance_exec'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:141:in `run_callbacks'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/abstract_controller/callbacks.rb:258:in `process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_controller/metal/rescue.rb:25:in `process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_controller/metal/instrumentation.rb:74:in `block in process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/notifications.rb:206:in `block in instrument'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/notifications/instrumenter.rb:58:in `instrument'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/notifications.rb:206:in `instrument'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_controller/metal/instrumentation.rb:73:in `process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_controller/metal/params_wrapper.rb:261:in `process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/railties/controller_runtime.rb:32:in `process_action'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/abstract_controller/base.rb:160:in `process'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionview-7.1.5.1/lib/action_view/rendering.rb:40:in `process'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_controller/metal.rb:227:in `dispatch'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_controller/metal.rb:309:in `dispatch'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/routing/route_set.rb:32:in `serve'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/journey/router.rb:51:in `block in serve'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/journey/router.rb:131:in `block in find_routes'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/journey/router.rb:124:in `each'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/journey/router.rb:124:in `find_routes'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/journey/router.rb:32:in `serve'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/routing/route_set.rb:882:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-3.1.13/lib/rack/tempfile_reaper.rb:20:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-3.1.13/lib/rack/etag.rb:29:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-3.1.13/lib/rack/conditional_get.rb:31:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-3.1.13/lib/rack/head.rb:15:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/http/permissions_policy.rb:36:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/http/content_security_policy.rb:36:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-session-2.1.0/lib/rack/session/abstract/id.rb:274:in `context'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-session-2.1.0/lib/rack/session/abstract/id.rb:268:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/cookies.rb:689:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/migration.rb:655:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:101:in `run_callbacks'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/callbacks.rb:28:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/executor.rb:14:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/actionable_exceptions.rb:16:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/web-console-4.2.1/lib/web_console/middleware.rb:132:in `call_app'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/web-console-4.2.1/lib/web_console/middleware.rb:28:in `block in call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/web-console-4.2.1/lib/web_console/middleware.rb:17:in `catch'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/web-console-4.2.1/lib/web_console/middleware.rb:17:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/railties-7.1.5.1/lib/rails/rack/logger.rb:37:in `call_app'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/railties-7.1.5.1/lib/rails/rack/logger.rb:24:in `block in call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/tagged_logging.rb:139:in `block in tagged'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/tagged_logging.rb:39:in `tagged'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/tagged_logging.rb:139:in `tagged'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/broadcast_logger.rb:241:in `method_missing'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/railties-7.1.5.1/lib/rails/rack/logger.rb:24:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/sprockets-rails-3.5.2/lib/sprockets/rails/quiet_assets.rb:17:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/remote_ip.rb:92:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/request_id.rb:28:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-3.1.13/lib/rack/method_override.rb:28:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-3.1.13/lib/rack/runtime.rb:24:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-7.1.5.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/server_timing.rb:59:in `block in call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/server_timing.rb:24:in `collect_events'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/server_timing.rb:58:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/executor.rb:14:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/static.rb:25:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/rack-3.1.13/lib/rack/sendfile.rb:114:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/actionpack-7.1.5.1/lib/action_dispatch/middleware/host_authorization.rb:141:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/railties-7.1.5.1/lib/rails/engine.rb:536:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/puma-6.6.0/lib/puma/configuration.rb:279:in `call'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/puma-6.6.0/lib/puma/request.rb:99:in `block in handle_request'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/puma-6.6.0/lib/puma/thread_pool.rb:390:in `with_force_shutdown'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/puma-6.6.0/lib/puma/request.rb:98:in `handle_request'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/puma-6.6.0/lib/puma/server.rb:472:in `process_client'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/puma-6.6.0/lib/puma/server.rb:254:in `block in run'\n/Users/jason/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/puma-6.6.0/lib/puma/thread_pool.rb:167:in `block in spawn_thread'\nCompleted 500 Internal Server Error in 38ms (Views: 0.8ms | ActiveRecord: 1.4ms | Allocations: 19479)\n```\n\u003c/details\u003e","author":{"url":"https://github.com/Jasonlgrd","@type":"Person","name":"Jasonlgrd"},"datePublished":"2025-06-20T08:16:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1473/jsonapi-resources/issues/1473"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:26f3367f-2bcb-a9df-bbe8-3e6fc47cb9fd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC37C:18BA88:2871918:37827A6:6A4EF8FF
html-safe-noncecdf55f2b10d275f0d19e1e2125f5170241b0e3cf89cf37cd9f6f6380552c3bde
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzdDOjE4QkE4ODoyODcxOTE4OjM3ODI3QTY6NkE0RUY4RkYiLCJ2aXNpdG9yX2lkIjoiOTM1ODAyOTYzODg4MTA5ODIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1a5b981c5e9cf7cf4c0f8622766d300a94a704e4a3d892d339b7f6e3db649327
hovercard-subject-tagissue:3162338254
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONAPI-Resources/jsonapi-resources/1473/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e7605bd06f9a9bf79a476476c08b0a675041d7227366742c4167c18b8a9f5953/JSONAPI-Resources/jsonapi-resources/issues/1473
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e7605bd06f9a9bf79a476476c08b0a675041d7227366742c4167c18b8a9f5953/JSONAPI-Resources/jsonapi-resources/issues/1473
og:image:altI try to upgrade JR from v0.9 to the last commit of v-0-11-dev branche. I have found a problem (maybe a bug) when I want to include the polymorphic relation. I have two tables: articles comments (w...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJasonlgrd
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
go-importgithub.com/JSONAPI-Resources/jsonapi-resources git https://github.com/JSONAPI-Resources/jsonapi-resources.git
octolytics-dimension-user_id262422067
octolytics-dimension-user_loginJSONAPI-Resources
octolytics-dimension-repository_id18248068
octolytics-dimension-repository_nwoJSONAPI-Resources/jsonapi-resources
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id18248068
octolytics-dimension-repository_network_root_nwoJSONAPI-Resources/jsonapi-resources
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b8f23afb982271f1b22258a94aede67a6b77760
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1473#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONAPI-Resources%2Fjsonapi-resources%2Fissues%2F1473
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONAPI-Resources%2Fjsonapi-resources%2Fissues%2F1473
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JSONAPI-Resources%2Fjsonapi-resources
Reloadhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1473
Reloadhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1473
Reloadhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1473
Please reload this pagehttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1473
JSONAPI-Resources https://github.com/JSONAPI-Resources
jsonapi-resourceshttps://github.com/JSONAPI-Resources/jsonapi-resources
Notifications https://github.com/login?return_to=%2FJSONAPI-Resources%2Fjsonapi-resources
Fork 543 https://github.com/login?return_to=%2FJSONAPI-Resources%2Fjsonapi-resources
Star 2.3k https://github.com/login?return_to=%2FJSONAPI-Resources%2Fjsonapi-resources
Code https://github.com/JSONAPI-Resources/jsonapi-resources
Issues 208 https://github.com/JSONAPI-Resources/jsonapi-resources/issues
Pull requests 52 https://github.com/JSONAPI-Resources/jsonapi-resources/pulls
Discussions https://github.com/JSONAPI-Resources/jsonapi-resources/discussions
Actions https://github.com/JSONAPI-Resources/jsonapi-resources/actions
Projects https://github.com/JSONAPI-Resources/jsonapi-resources/projects
Wiki https://github.com/JSONAPI-Resources/jsonapi-resources/wiki
Security and quality 0 https://github.com/JSONAPI-Resources/jsonapi-resources/security
Insights https://github.com/JSONAPI-Resources/jsonapi-resources/pulse
Code https://github.com/JSONAPI-Resources/jsonapi-resources
Issues https://github.com/JSONAPI-Resources/jsonapi-resources/issues
Pull requests https://github.com/JSONAPI-Resources/jsonapi-resources/pulls
Discussions https://github.com/JSONAPI-Resources/jsonapi-resources/discussions
Actions https://github.com/JSONAPI-Resources/jsonapi-resources/actions
Projects https://github.com/JSONAPI-Resources/jsonapi-resources/projects
Wiki https://github.com/JSONAPI-Resources/jsonapi-resources/wiki
Security and quality https://github.com/JSONAPI-Resources/jsonapi-resources/security
Insights https://github.com/JSONAPI-Resources/jsonapi-resources/pulse
Include a inverse polymorphic return a relationship errorhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1473#top
https://github.com/Jasonlgrd
Jasonlgrdhttps://github.com/Jasonlgrd
on Jun 20, 2025https://github.com/JSONAPI-Resources/jsonapi-resources/issues/1473#issue-3162338254
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.