Updated managedobjectcontext to allow use of parent-child relationships