change the parentId to be optional