-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wings: use AttributesTransformer to populate ordered reflections
we had previously manually populated valkyrie Resource `#member_ids` from ActiveFedora's `#ordered_member_ids` when it was present. the implementation had four problems: - it accessed `#member_ids` on objects for which it was defined as a `HasManyReflection`, causing the tranformation to load all the members(!!); - it failed to retain unordered `#member_ids` if any `#ordered_member_ids` were present. in Hydra::Works, it's possible to have both. - it ignored `OrdersReflections` other than `#ordered_member_ids`; - it repeatedly loaded the `#member_ids`, since `AttributeTransformer` already handled the unordered mapping via `IndirectlyContainsReflection`. this should solve all three problems by acting on `OrdersReflection` as well the various `*ContainsReflection` instances. if an `OrdersReflection` is present the resulting ids will contain the relevant values in order, either before or after the unordered values (which may, most often, be empty). --- after this change: 1 0.032793 0.006267 0.039060 ( 0.047836) 10 0.057116 0.003111 0.060227 ( 0.067870) 100 0.044683 0.003256 0.047939 ( 0.057653) 1_000 0.102635 0.000026 0.102661 ( 0.120755) 10_000
- Loading branch information
tamsin johnson
committed
Sep 6, 2023
1 parent
2700bc2
commit 46e8233
Showing
4 changed files
with
35 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters