not call commit when generator is null