CMPUT301F13T03/adventure.datetime — pull request #88 by afontaine (2013-11-27 07:28:09+00:00)
Title: Double loading of story fragments

When loading a story from the database you load the fragments as well but then discard them. All the loading does is essentially verify that they exist before populating the story object with their ids (which you already had). Line 542 of StoryDB.java.

Story newStory = new Story(headFragmentId, id, author, timestamp, synopsis, thumbnail, title);

ArrayList referencedFragments = this.getStoryFragments(id);

for(StoryFragment frag : referencedFragments)
{
newStory.addFragment(frag);
}

newStory.addFragment just keeps the id that the frag has.