fixed: update/insert for child models generated an incorrect query (blocked for a while)
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1201 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
f8d88d1459
commit
265197ce47
|
@ -826,7 +826,9 @@ protected:
|
||||||
field_model_left_join(db_field_name, flat_field_name, field_model, insertable, updatable, has_foreign_key, db_expression);
|
field_model_left_join(db_field_name, flat_field_name, field_model, insertable, updatable, has_foreign_key, db_expression);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( db_expression->get_output_type() != MORM_OUTPUT_TYPE_JOIN_TABLES )
|
if( db_expression->get_output_type() != MORM_OUTPUT_TYPE_JOIN_TABLES &&
|
||||||
|
db_expression->get_output_type() != MORM_OUTPUT_TYPE_DB_INSERT &&
|
||||||
|
db_expression->get_output_type() != MORM_OUTPUT_TYPE_DB_UPDATE )
|
||||||
{
|
{
|
||||||
// FIX ME
|
// FIX ME
|
||||||
// UPDATE, INSERT, REMOVE for models
|
// UPDATE, INSERT, REMOVE for models
|
||||||
|
@ -958,7 +960,10 @@ protected:
|
||||||
{
|
{
|
||||||
DbExpression * db_expression = db_connector->get_expression();
|
DbExpression * db_expression = db_connector->get_expression();
|
||||||
|
|
||||||
if( db_expression && !is_empty_field(db_field_name) && db_expression->get_output_type() != MORM_OUTPUT_TYPE_JOIN_TABLES )
|
if( db_expression && !is_empty_field(db_field_name) &&
|
||||||
|
db_expression->get_output_type() != MORM_OUTPUT_TYPE_JOIN_TABLES &&
|
||||||
|
db_expression->get_output_type() != MORM_OUTPUT_TYPE_DB_INSERT &&
|
||||||
|
db_expression->get_output_type() != MORM_OUTPUT_TYPE_DB_UPDATE )
|
||||||
{
|
{
|
||||||
// another select will be used (from another Finder)
|
// another select will be used (from another Finder)
|
||||||
// we need only columns name
|
// we need only columns name
|
||||||
|
|
Loading…
Reference in New Issue