added parentId relation for entities