Update code generator to support Transaction in setValue