Now invalidating parent after child entity creation
Updated error checking code