valkyrie icon indicating copy to clipboard operation
valkyrie copied to clipboard

Update shared spec property names

Open hackartisan opened this issue 6 years ago • 2 comments

In the shared spec for the query service find_references_by the dummy property is called a_member_of. It's sort of confusing because there's already a membership property that valkyrie uses by default. It would be good to use a different property name that better illustrated an actual use case. There are probably others, e.g. find_inverse_references_by where similar changes would be helpful.

hackartisan avatar Mar 20 '19 13:03 hackartisan

We are touching the queries shared spec for Issue #775. The changes we are making use the a_member_of attribute. There will be quite a bit of overlap between the resolution of this issue and #775. See PR #790 which adds model filtering to find_references_by and find_inverse_references_by.

elrayle avatar Oct 23 '19 10:10 elrayle

For filtering, we need two classes that have the same dummy property from parent to child and a second dummy property from child to parent. This allows multiple results with different models so filtering results by model can be tested.

Something like this would be compatible with the #775 work...

Book hasSection TableOfContents Book hasSection Index

TitlePage referencedIn Index TableOfContents referencedIn Index

These models and relationships would allow for...

find_references_by(resource: book, property: hasSection, model: TableOfContents)
find_inverse_references_by(resource: index, property: referencedIn, model: TitlePage)

elrayle avatar Oct 23 '19 11:10 elrayle