You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This cyclical relationship should be handled by the acts_as_double_polymorphic_join but it's erroring in production, possibly due preloading of models and caching them, not sure.
The error we receive in production is ActionView::TemplateError: Mysql::Error: Unknown column 'accessibles.accessible_product_id'
The foreign and polymorphic keys are clearly defined, not sure why this is happening and only in production.
The text was updated successfully, but these errors were encountered:
We're getting an interesting situation where a specific series of relationships produces an unknown column error in production only.
Consider the following:
class User < ActiveRecord::Base
has_many_polymorphs :accessible_products, :through => :accessibles, :as => :contact,
:foreign_key => 'contact_id', :foreign_type_key => 'contact_type',
:polymorphic_key => 'owner_id', :polymorphic_type_key => 'owner_type',
:from => [:"product/one",:"product/two"]
end
This cyclical relationship should be handled by the acts_as_double_polymorphic_join but it's erroring in production, possibly due preloading of models and caching them, not sure.
The error we receive in production is ActionView::TemplateError: Mysql::Error: Unknown column 'accessibles.accessible_product_id'
The foreign and polymorphic keys are clearly defined, not sure why this is happening and only in production.
The text was updated successfully, but these errors were encountered: