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

Ensure that ids_writer and ids_reader is working for CPK #47925

Commits on Apr 12, 2023

  1. Ensure that ids_writer and ids_reader is working for CPK

    This fixes `ids_writer` so that it can handle a composite primary key.
    Using a CPK model associated with a non-CPK model was working correctly
    (which I added a test for). Using a CPK model associated with another
    CPK model was not working correctly. It now takes it into account to
    write the correct ids.
    
    While working on `ids_reader` I found that `pluck` is not working for
    CPK because it's passing an array of attributes and that's not supported
    by `disallow_raw_sql!`. I chose to call `flatten` in `pluck` but not
    conditionally because this seems like it could be a problem elsewhere as
    well. This fixes pluck by CPK overall and fixes a test in the
    calculations test file.
    eileencodes committed Apr 12, 2023
    Configuration menu
    Copy the full SHA
    885bd85 View commit details
    Browse the repository at this point in the history