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

add first and last predicates when proxy is added #80

Open
elrayle opened this issue Oct 5, 2015 · 4 comments
Open

add first and last predicates when proxy is added #80

elrayle opened this issue Oct 5, 2015 · 4 comments
Labels

Comments

@elrayle
Copy link
Contributor

elrayle commented Oct 5, 2015

col = Collection.new(id: 'col-1')    # includes Hydra::Works::CollectionBehaviors
col.save
work = BibliographicWork.new(id: 'work-1')  # includes Hydra::Works::GenericWorkBehaviors
col.generic_works << work

In Fedora...
fedora_col-1_pre_save

Observations:

  • col contains work
  • col hasMember proxy to work
  • first and last predicates DO NOT exist in col
col.save

fedora_col-1_post_save

Observations:

  • first and last predicates now exist in col

If work is automatically saved and a proxy is added to col's members, then first and last
predicates should also automatically be added without having to do a manually save.

@elrayle elrayle added the bug label Oct 5, 2015
@jcoyne
Copy link
Contributor

jcoyne commented Oct 5, 2015

@elrayle are you describing behavior you'd like to see or a problem with the current behavior? Can you describe what it will look like when the problem is fixed? Also the "view in fedora" links aren't very helpful as they point to your local system. Can you add screenshots instead?

@elrayle elrayle changed the title add prev and next predicates when proxy is added add first and last predicates when proxy is added Oct 6, 2015
@elrayle
Copy link
Contributor Author

elrayle commented Oct 6, 2015

I must have been half asleep when I wrote that. The issue is with the first and last predicates on the collection. Those predicates do not get created when the proxy is created and added to the collection and they should be added when the proxy is added as a member.

elrayle added a commit that referenced this issue Oct 6, 2015
@elrayle
Copy link
Contributor Author

elrayle commented Oct 6, 2015

I added two tests to association_spec.rb (lines 80-88) in branch test_issue_80 to check for first and last.

@tpendragon
Copy link
Contributor

I think this is fixed with the new ordering - yes @jcoyne @elrayle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants