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

Composite Primary Key id method docs #49112

Merged
merged 2 commits into from Sep 1, 2023
Merged

Conversation

gmcgibbon
Copy link
Member

@gmcgibbon gmcgibbon commented Sep 1, 2023

Motivation / Background

This Pull Request has been created because Active Record's CPK support needs documentation.

Detail

This Pull Request changes Active Record to add docs for #id, #id=, #id?, #id_before_type_cast, #id_was, #id_in_database, and #id_value.

#id_value was added in #48930.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

Adds documentation to exaplain composite key behaviour in
ActiveRecord::AttributeMethods::PrimaryKey for
methods #id, #id=, #id?, #id_before_type_cast, #id_was, #id_in_database.
Adds documention for ActiveRecord::ModelSchema#id_value as a utility
when using composite primary keys.
@eileencodes eileencodes merged commit 3bc6401 into rails:main Sep 1, 2023
1 check passed
@gmcgibbon gmcgibbon deleted the cpk_id_docs branch September 1, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants