fixed: compilation erorr when inserting/updating a Model object which has child lists without Model objects such as std::list<int>
added: to Model: methods insert, update, remove and save with one argument: bool save_whole_tree
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1217 e52654a7-88a9-db11-a3e9-0013d4bc506e
fixed: a parent key was not set in list of childs (insert statements)
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1215 e52654a7-88a9-db11-a3e9-0013d4bc506e
we can use our own class (based on FlatConnector and FlatExpression) to generate documentation
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1213 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: ModelEnv::model_connector_submode (used in iterating through childs)
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1211 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: now we set flag save_mode = DO_NOTHING_ON_SAVE for objects for which
all fields from a database result set are null
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1210 e52654a7-88a9-db11-a3e9-0013d4bc506e
we do not use auto generated 'select' and when we are using prefixes for columns
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1209 e52654a7-88a9-db11-a3e9-0013d4bc506e
an additional field (model_save_mode) is printed
changed: if there is no an object the Cursor returns a Model with DO_NOTHING_ON_SAVE flag now
(DO_INSERT_ON_SAVE was beforehand)
fixed: when reading a result from db: for auto generated select there should be used
get_value_by_field_index() method instead of get_value_by_field_name()
changed: flat string (json) is generated only if a model has DO_INSERT_ON_SAVE
or DO_UPDATE_ON_SAVE or is dump_mode turn on
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1208 e52654a7-88a9-db11-a3e9-0013d4bc506e
for setting a parent key id in child models,
it is called after after_insert() method
added: SetFieldValueHelper class used for storing primary key values from a parent model
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1204 e52654a7-88a9-db11-a3e9-0013d4bc506e
similarly in generate_update_query and generate_remove_query
added: support std::vector<> in Model::field() methods
added: serializing std::vector and std::list for non-model classes in BaseExpression
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1200 e52654a7-88a9-db11-a3e9-0013d4bc506e
added BaseExpression::need_to_add_field_prefix()
now the fields() methods don't take add_column_prefix parameter
but the field_name (wchar_t*) is tested whether is it a long (with a period) or short name
added BaseExpression::save_foreign_key() (code moved from field())
removed some default method arguments from BaseExpression
added neq() method for Finder
added DbExpression::prepare_short_table_name(const PT::TextStream & table_name, PT::TextStream & short_table_name)
git-svn-id: svn://ttmath.org/publicrep/morm/branches/join_models@1194 e52654a7-88a9-db11-a3e9-0013d4bc506e
(this was for a custom prefix)
- removed column_prefix and column_prefix_index from BaseExpression
now we have a pointer to ModelEnv passed in field() method
- to ModelEnv: added table_name, table_name_simple and table_index
git-svn-id: svn://ttmath.org/publicrep/morm/branches/join_models@1193 e52654a7-88a9-db11-a3e9-0013d4bc506e
- added FinderHelper class - used as a global object for the whole model tree in Finder
(some fields moved from ModelData)
- added CursorHelper class - used as a global object for the whole model tree in Cursor
(some fields moved from ModelData)
git-svn-id: svn://ttmath.org/publicrep/morm/branches/join_models@1192 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: ModelEnv class - now Model has a pointer to ModelEnv
and ModelEnv has a pointer to ModelData, model_connector_mode, table_index and doc_field_pointer
git-svn-id: svn://ttmath.org/publicrep/morm/branches/join_models@1191 e52654a7-88a9-db11-a3e9-0013d4bc506e
(the primary key should consist of only one column at the moment)
git-svn-id: svn://ttmath.org/publicrep/morm/branches/join_models@1186 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: using ModelData in BaseExpression so Model::to_text() functions can use a ModelData object now
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1175 e52654a7-88a9-db11-a3e9-0013d4bc506e
changed: model connector is propagated to childs when needed
(when update, insert, save, to_text is called or in finder)
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1120 e52654a7-88a9-db11-a3e9-0013d4bc506e
now in Model we have field() methods for other Model or std::list<Model>
(code not tested)
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1118 e52654a7-88a9-db11-a3e9-0013d4bc506e
- support for fetching rows from db
- support for inserting/updating rows
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1081 e52654a7-88a9-db11-a3e9-0013d4bc506e