Open flyingzumwalt opened 9 years ago
It's not clear to me how this is going to put generic_file_ids in order since generic_files is a subset of the members list. It could be interleaved with generic_works too. See https://github.com/projecthydra-labs/hydra-works/blob/master/lib/hydra/works/models/concerns/generic_work_behavior.rb#L23-L24
Your comment doesn't apply to this ticket. Did you mean to comment on the related issue in hydra-works? Even if we define a different aggregation to track these members, we will still need to be able to update the members list based on an array of ids without loading all of the member objects.
On Tuesday, September 8, 2015, Justin Coyne notifications@github.com wrote:
It's not clear to me how this is going to put generic_file_ids in order since generic_files is a subset of the members list. It could be interleaved with generic_works too. See https://github.com/projecthydra-labs/hydra-works/blob/master/lib/hydra/works/models/concerns/generic_work_behavior.rb#L23-L24
— Reply to this email directly or view it on GitHub https://github.com/projecthydra-labs/activefedora-aggregation/issues/71#issuecomment-138745820 .
@flyingzumwalt I'm not sure you want to do that. In fact, I'm suddenly wondering what's happening to the proxy nodes when you set actual objects to the filter associations - it may be we don't want setters for #generic_files at all.
I think you're both getting confused by the name of this aggregation. In this test, Image aggregates generic_files. generic_files is a regular aggregation, not a filtered aggregation, meaning that in this test image.generic_files is equivalent to pcdm_object.members, not hydra_works_object.generic_files
On Wednesday, September 9, 2015, Trey Terrell notifications@github.com wrote:
@flyingzumwalt https://github.com/flyingzumwalt I'm not sure you want to do that. In fact, I'm suddenly wondering what's happening to the proxy nodes when you set actual objects to the filter associations - it may be we don't want setters for #generic_files at all.
members is a list of all members with a set of proxy nodes which
auto-link themselves up in a doubly linked list. My concern is that you'd get a list of GenericFiles from #generic_files, set #generic_files= to a new reordering of them, and then a "work" in the middle (which you couldn't see before because you filtered it out in display) would get orphaned from the ordered chain.
— Reply to this email directly or view it on GitHub https://github.com/projecthydra-labs/activefedora-aggregation/issues/71#issuecomment-138944311 .
See the ids_writer branch for tests that outline how this should work