Skip to content
  • Prathamesh Sonpatki's avatar
    29cf0dd9
    Fix AR::Relation#cache_key to remove select scope added by user · 29cf0dd9
    Prathamesh Sonpatki authored
    - We don't need the select scope added by user as we only want to max
      timestamp and size of the collection. So we already know which columns
      to select.
    - Additionally having user defined columns in select scope blows the cache_key
      method with PostGreSQL because it needs all `selected` columns in the group_by
      clause or aggregate function.
    - Fixes #23038.
    29cf0dd9
    Fix AR::Relation#cache_key to remove select scope added by user
    Prathamesh Sonpatki authored
    - We don't need the select scope added by user as we only want to max
      timestamp and size of the collection. So we already know which columns
      to select.
    - Additionally having user defined columns in select scope blows the cache_key
      method with PostGreSQL because it needs all `selected` columns in the group_by
      clause or aggregate function.
    - Fixes #23038.
Loading