You are saving the adventures here, but not the library_id of where they came from. You should do this either by passing the id into the create like this ` Adventure.create(guid: adv['guid'], title: adv['title'], author: adv['author']), library_id: library_id`, or building all of the adventures off of the library you are pulling from the database like this `library.adventures.create(guid: adv['guid'], title: adv['title'], author: adv['author'])`