Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MySQL] Correct $returningId() implementation to correctly store selected fields #2975

Merged

Commits on Sep 16, 2024

  1. Add test to reproduce $returningId() column order issue

    Currently, $returningId() only works when the primary key is in the
    first column (of the Drizzle table definition not the underlying
    MySQL table).
    
    This new test checks for this behaviour by using $returningId()
    when the primary key is in the second column.
    
    See drizzle-team#2971
    
    Signed-off-by: Daniel Harvey <[email protected]>
    danielsharvey committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5bbb37a View commit details
    Browse the repository at this point in the history
  2. Fix $returningId() to correctly set selected fields

    The local variable `returning` computes the selected fields in
    $returningId() but throws this away. Change to correctly
    store config in the insert query builder.
    
    Fixed drizzle-team#2971
    
    Signed-off-by: Daniel Harvey <[email protected]>
    danielsharvey committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    18a460d View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2024

  1. Configuration menu
    Copy the full SHA
    987498d View commit details
    Browse the repository at this point in the history