Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Dec 05, 2024
  2. Dec 04, 2024
  3. Dec 03, 2024
  4. Nov 30, 2024
  5. Nov 29, 2024
  6. Nov 28, 2024
  7. Nov 27, 2024
  8. Nov 26, 2024
  9. Nov 25, 2024
    • Chris Truter's avatar
      Delete Hybrid Index Search (#50444) · 162437a2
      Chris Truter authored
      Unverified
      162437a2
    • John Swanson's avatar
      Don't dissoc `:id` in `before-update` (#50375) · 25bab869
      John Swanson authored
      * Don't dissoc `:id` in `before-update`
      
      There seems to be a nasty footgun in toucan2 here.
      
      Say you're executing an `update!` command on a set of IDs, e.g.:
      
      ```
      (t2/update! :model/Card :id [:in 1 2] {:view_count 1})
      ```
      
      This works if:
      
      - both cards 1 and 2 have `view_count=1` already
      
      - both cards 1 and 2 have `view_count!=1`
      
      However.
      
      If one of the two cards has `view_count=1` and another has a different
      view_count, then (if the `before-update` method doesn't have the primary
      key attached) Toucan emits a call to update *every card in the
      database*, without a where clause at all.
      Unverified
      25bab869
Loading