Added duplicate key handling in mongo update
Fixed bug where children entities weren't getting their parents fields