fixed: in cursor in add_models_to_list(): added_model.model_env should be set after added_model.clear()

fixed: when generating: insert, update or remove statements we have used prefixes for columns
       but the table name was not set in ModelEnv (now we do not use prefixes in such statements)
changed: log_queries field moved from PostgreSQLConnector to DbConnector





git-svn-id: svn://ttmath.org/publicrep/morm/branches/join_models@1195 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2019-06-17 10:59:39 +00:00
parent b6fbe29805
commit 2533b18cfd
6 changed files with 32 additions and 24 deletions

View File

@@ -302,8 +302,6 @@ protected:
ModelClass & added_model = result.back();
ModelEnv model_env_local;
added_model.model_env = &model_env_local;
added_model.model_env->cursor_helper = &cursor_helper;
try
{
@@ -313,6 +311,9 @@ protected:
added_model.set_connector(model_connector);
added_model.clear();
added_model.model_env = &model_env_local;
added_model.model_env->cursor_helper = &cursor_helper;
added_model.set_save_mode(Model::DO_UPDATE_ON_SAVE); // IMPROVE ME check if there is a primary key
added_model.model_env->model_data = model_data;
added_model.before_select();