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
ActiveRecord::StatementInvalid (SQLite3::SQLException: no such column: widget: SELECT widget, "items"."id" FROM "items" WHERE "items"."widget_type" = ? AND "items"."widget_id" IN (?, ?))
I can't change my cache_index to cache_index :widget_id, :widget_type because fetch_multi_by methods are only generated for cache_indexes with only one field.
I used to be able to pass in arrays into the fetch_by_widget_id_and_subject_type methods in 0.5.1, but now that doesn't work on master (e.g. an array of widget_ids generates a SQL query with NULL as the widget_id value). I guess was never the way those methods were intended to be used, but now I don't have a way to bulk fetch Items in a way that won't make N+1 queries when the cache is missed.
The text was updated successfully, but these errors were encountered:
I can't change my cache_index to cache_index :widget_id, :widget_type because fetch_multi_by methods are only generated for cache_indexes with only one field.
Right, there isn't cache_attribute by multiple columns support, which means there is no cache_index by multiple columns support.
I have made a new rails app with these models on the latest master of identity_cache:
models/item.rb
models/foo_widget.rb
models/bar_widget.rb
schema:
I would like to be able to run this:
But, that generates an invalid SQL query:
I can't change my cache_index to
cache_index :widget_id, :widget_type
becausefetch_multi_by
methods are only generated for cache_indexes with only one field.I used to be able to pass in arrays into the
fetch_by_widget_id_and_subject_type
methods in 0.5.1, but now that doesn't work on master (e.g. an array of widget_ids generates a SQL query with NULL as the widget_id value). I guess was never the way those methods were intended to be used, but now I don't have a way to bulk fetch Items in a way that won't make N+1 queries when the cache is missed.The text was updated successfully, but these errors were encountered: