support upsert from empty array