Skip to content
  • Nikita Vasilevsky's avatar
    c2c861f9
    Always request `primary_key` in `RETURNING` if no other columns requested · c2c861f9
    Nikita Vasilevsky authored
    Prior 7.1 Rails always included `primary_key` in `RETURNING` clause on
    record creation. This was changed in 7.1 to include more auto-populated
    columns if such columns exist. This change lead to situations where
    no columns were requested in `RETURNING` clause, even the `primary_key`.
    
    This change brings back the old behavior of always requesting the
    `primary_key` in `RETURNING` clause if no other columns are requested.
    c2c861f9
    Always request `primary_key` in `RETURNING` if no other columns requested
    Nikita Vasilevsky authored
    Prior 7.1 Rails always included `primary_key` in `RETURNING` clause on
    record creation. This was changed in 7.1 to include more auto-populated
    columns if such columns exist. This change lead to situations where
    no columns were requested in `RETURNING` clause, even the `primary_key`.
    
    This change brings back the old behavior of always requesting the
    `primary_key` in `RETURNING` clause if no other columns are requested.
Loading