added: support for generating LEFT JOIN statement in Finder

(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
This commit is contained in:
2019-03-26 18:34:07 +00:00
parent 440f56e376
commit 9c7a0f3d7e
10 changed files with 266 additions and 70 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2018, Tomasz Sowa
* Copyright (c) 2018-2019, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,6 +56,12 @@ void DbExpression::set_output_type(int output_type)
}
int DbExpression::get_output_type()
{
return output_type;
}
bool DbExpression::can_field_be_generated(bool insertable, bool updatable, bool is_primary_key)
{
if( output_type == MORM_OUTPUT_TYPE_DB_INSERT )
@@ -68,7 +74,7 @@ bool DbExpression::can_field_be_generated(bool insertable, bool updatable, bool
return updatable;
}
else
if( output_type == MORM_OUTPUT_TYPE_DB_PRIMARY_KEY )
if( output_type == MORM_OUTPUT_TYPE_DB_PRIMARY_KEY || output_type == MORM_OUTPUT_TYPE_JOIN_TABLES )
{
return is_primary_key;
}