update entities add relation