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

DON'T MERGE - SHOWS BUG: directly_contains doesn't let you create relationships in memory and doesn't work with anything but Files #858

Closed
wants to merge 1 commit into from

Conversation

flyingzumwalt
Copy link
Member

ref #857

3 tests to show what happens when you

  1. try to directly contain an ActiveFedora::Base instead of an ActiveFedora::File
  2. try to add directly_contained objects in memory (add to a parent object that hasn't been saved yet)

@flyingzumwalt
Copy link
Member Author

@elrayle @jcoyne Clearer examples of the problems with directly_contains that are forcing downstream tests to always create/save instead of testing in memory.

@flyingzumwalt flyingzumwalt changed the title BUG: directly_contains doesn't let you create relationships in memory and doesn't work with anything but Files DON'T MERGE - SHOWS BUG: directly_contains doesn't let you create relationships in memory and doesn't work with anything but Files Jul 14, 2015
@tpendragon
Copy link
Contributor

@jcoyne I'm looking at this ticket now and the major issue seems to be that you have to assign an ID at instantiation. Maybe AF::Base objects should have flexible IDs until they're persisted?

@jcoyne
Copy link
Member

jcoyne commented Jul 20, 2015

@terrellt yes, the current solution was an expedient way to get it done, but certainly not the best way. It probably just needs to get set up with an autosave.

@mjgiarlo
Copy link
Member

@terrellt Does this PR still need attention?

@tpendragon
Copy link
Contributor

@mjgiarlo Yup, still broken.

@grosscol
Copy link
Member

Just ran into this one again as I'm trying to refactor the specs to avoid calling .save when possible. Manually assigning an id when creating an object doesn't alleviate the situation.

@jrgriffiniii
Copy link
Contributor

I am closing this due to the age of this pull request.

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

Successfully merging this pull request may close these issues.

6 participants