fixed: prepare_to_select() should initialize 'model' but it was initialized only in select()

This commit is contained in:
Tomasz Sowa 2021-04-08 17:19:52 +02:00
parent 1e2cbad6a7
commit d78aa325d3
1 changed files with 11 additions and 11 deletions

View File

@ -173,6 +173,17 @@ public:
last_query_error = L"model connector object is required";
}
model.set_connector(model_connector);
finder_helper.clear();
model_env.clear();
model.model_env = &model_env;
model.model_env->model_data = model_data;
model.model_env->finder_helper = &finder_helper;
model.prepare_table();
model.model_env->add_table_name_to_finder_helper();
return *this;
}
@ -219,17 +230,6 @@ public:
prepare_to_select();
}
model.set_connector(model_connector);
finder_helper.clear();
model_env.clear();
model.model_env = &model_env;
model.model_env->model_data = model_data;
model.model_env->finder_helper = &finder_helper;
model.prepare_table();
model.model_env->add_table_name_to_finder_helper();
has_autogenerated_select = true;
if( model_connector && out_stream && db_expression )