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

Add support for non-PK columns #185

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Aug 23, 2024

  1. Configuration menu
    Copy the full SHA
    99a7c44 View commit details
    Browse the repository at this point in the history
  2. Enable setting Model.global_id_column

    This allows overriding the column used to define GIDs
    tylerwillingham committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    46208a1 View commit details
    Browse the repository at this point in the history
  3. ♻️ Eliminate unnecessary hash state

    Because of Identification.global_id_column, we can keep this internal
    API much cleaner and avoid mucking with hash state to pass around this
    column
    tylerwillingham committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    6cd2b82 View commit details
    Browse the repository at this point in the history
  4. ♻️ Model#global_id_method instead of Model#global_id_column

    `Model.primary_key` is actually irrelevant to this feature, the only
    thing that matters is the model method.
    
    For composite keys, or primary keys not named "id", we still get the
    important value from `Model#id`, the only time we don't is when we need
    to use a non-PK column.
    tylerwillingham committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    314bc0d View commit details
    Browse the repository at this point in the history