Use @Param
annotation like this
@Insert(CREATE)
@Options(useGeneratedKeys = true, keyProperty = "object.id", flushCache = true)
public int write(@Param("tablename") String tablename,
@Param("object") Object object) throws Exception;
and query
INSERT INTO ${tablename} (column1, column2) VALUES (#{object.column1}, #{object.column2})