Integrated base class support for foreign keys #1499
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary Change Description
Turned
is_fk
into an instance attribute of theBSTColumn
class instead of a class attribute of theBSTBaseColumn
class.I realized that
is_fk
is not necessarily a characteristic exclusive to the plannedBSTRelatedColumn
. A regularField
column (i.e.BSTColumn
) can have fields that are foreign keys and they can be linked whether or not we've defined aBSTRelatedColumn
. The features thatBSTRelatedColumn
will allow is the specification of a display value instead of how a related model object happens to render in str context. Just note that the foreign key cannot be searched or sorted based on that string-context value. That's what defining aBSTRelatedColumn
will provide.Details:
is_key_field
is_fk
in theBSTBaseColumn
asFalse
if it is not set/defined.is_related
toBSTBaseColumn
and madesearchable
andsortable
automatically defaulted based on whether the field was a foreign key.Affected Issues/Pull Requests
bst_annot_col
BSTAnnotColumn
(and refactor/re-org) #1494BSTRelatedColumn
#1500Reviewer Notes/Requests
See comments in-line.
Checklist
This pull request will be merged once the following requirements are met. The
author and/or reviewers should uncheck any unmet requirements:
CHANGELOG.md
Unreleased section