Skip to content

Commit

Permalink
Fix #1327
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Oct 3, 2013
1 parent 71ba11a commit e2abf39
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ext/mvc/model/query/builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ PHALCON_INIT_CLASS(Phalcon_Mvc_Model_Query_Builder){
PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, __construct){

zval *params = NULL, *dependency_injector = NULL, *conditions = NULL;
zval *models, *columns, *group_clause;
zval *models, *columns, *group_clause, *joins;
zval *having_clause, *order_clause, *limit_clause;
zval *offset_clause, *for_update, *shared_lock;

Expand Down Expand Up @@ -160,7 +160,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, __construct){
phalcon_array_fetch_string(&columns, params, SL("columns"), PH_NOISY);
phalcon_update_property_this(this_ptr, SL("_columns"), columns TSRMLS_CC);
}


/**
* Assign JOIN clause
*/
if (phalcon_array_isset_string(params, SS("joins"))) {
PHALCON_OBS_VAR(joins);
phalcon_array_fetch_string(&joins, params, SL("joins"), PH_NOISY);
phalcon_update_property_this(this_ptr, SL("_joins"), joins TSRMLS_CC);
}

/**
* Assign GROUP clause
*/
Expand Down Expand Up @@ -438,7 +447,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, join){
* @param string $model
* @param string $conditions
* @param string $alias
* @param string $type
* @return Phalcon\Mvc\Model\Query\Builder
*/
PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, innerJoin){
Expand Down

0 comments on commit e2abf39

Please sign in to comment.