fixed: Finder didn't use ModelData structure when creating the select query

ModelData structure was used only later in Cursor
fixed: in  Finder::select(PT::TextStream & out_stream, ModelConnector & model_connector) 
       and Finder::select(PT::TextStream & out_stream, ModelConnector * model_connector) 
       there was 'out_stream' parameter ignored




git-svn-id: svn://ttmath.org/publicrep/morm/branches/stable-2019-03-29@1222 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2019-09-26 17:15:00 +00:00
parent e6d684cb2e
commit 0890f27fe5
2 changed files with 6 additions and 3 deletions

View File

@ -220,7 +220,6 @@ public:
{
this->out_stream = &out_stream;
this->model_connector = &model_connector;
set_out_stream();
return select();
}
@ -229,7 +228,6 @@ public:
{
this->out_stream = &out_stream;
this->model_connector = model_connector;
set_out_stream();
return select();
}
@ -242,6 +240,11 @@ public:
prepare_to_select();
}
model.set_connector(model_connector);
model.model_data = model_data;
// we don't have to clear the model because it is not returned to the user
// the returned model is from Cursor
if( model_connector && out_stream )
{
(*out_stream) << "SELECT ";

View File

@ -977,7 +977,7 @@ protected:
virtual bool is_empty_field(const wchar_t * value);
// template<typename ModelClass> friend class Finder;
template<typename ModelClass> friend class Finder;
template<typename ModelClass> friend class Cursor;
friend class BaseExpression;