petehamilton / citier

CITIER (Class Inheritance & Table Inheritance Embeddings for Rails) is a solution for simple Multiple Class Inheritance in Rails.
88 stars 24 forks source link

:counter_cache => true support #51

Open axsuul opened 12 years ago

axsuul commented 12 years ago

I'm trying to enable counter cache for a citier model's association like so

class Comment
  belongs_to :media, :counter_cache => true
end

and also adding a comments_count column for the root model Media. However, there doesn't seem to be support for the counter cache since I'm getting thrown this error

ActiveRecord::StatementInvalid: PGError: ERROR:  cannot update a view
HINT:  You need an unconditional ON UPDATE DO INSTEAD rule.

Anyone know of a workaround?