rails_sql_views, :git => 'git://github.com/DouweM/rails_sql_views.git' (others dit not work)
sqlite Adapter
When I call update_all on a acts_as_citier child class with additional attributes
I get:
ActiveRecord::StatementInvalid: SQLite3::SQLException: cannot modify view_ecm_references_item_pictures because it is a view:
UPDATE "view_ecm_references_item_pictures"
SET "updated_at" = '2012-12-11 13:28:02.581609'
WHERE "view_ecm_references_item_pictures"."id" IN (SELECT "view_ecm_references_item_pictures"."id" FROM "view_ecm_references_item_pictures" WHERE "view_ecm_references_item_pictures"."type" IN ('Ecm::References::Item::Picture') ORDER BY position ASC)
I had to set the primary key on the picture model, otherwise I got errors.This seems strange to me, too.
The problem is that the update_all uses the view when trying to update. AFAIK this is not possible in sql. Any cluse, how to solve this? Any other people, with the same problem?
Using:
When I call update_all on a acts_as_citier child class with additional attributes
I get:
The models:
I had to set the primary key on the picture model, otherwise I got errors.This seems strange to me, too.
The problem is that the update_all uses the view when trying to update. AFAIK this is not possible in sql. Any cluse, how to solve this? Any other people, with the same problem?
Thanks in advance!