Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

criteria: fix issue #2157 and added tests #2220

Merged
merged 2 commits into from
Mar 31, 2014
Merged

Conversation

maxgalbu
Copy link
Contributor

See the discussion here:
http://forum.phalconphp.com/discussion/1479/multiple-joins-in-oo-notation-fail

From what I saw, the problem was that the current_joins was merged with the join array instead of appended, so it resulted in something like this:

array(
    //first join
    0 => array(
        'type' => "LEFT",
        'conditions' => "...",
    ),

    //all the following joins
    'type' => "LEFT",
    'conditions' => "...",
)

instead of

array(
    //first join
    0 => array(
        'type' => "LEFT",
        'conditions' => "...",
    ),

    //all the following joins
    1 => array(
        'type' => "LEFT",
        'conditions' => "...",
    ),
)

I don't know how to copy a zval and I'm guessing I couldn't edit current_joins directly, so to avoid editing too much code I simpy added an array of array that can be merged with current_joins or copy-written on merged_joins.

@maxgalbu maxgalbu changed the title Issue2157 criteria: fix issue #2157 and added tests Mar 22, 2014
@niden niden closed this Mar 27, 2014
@maxgalbu
Copy link
Contributor Author

@niden do i need to resubmit this or can you reopen it?

@niden niden reopened this Mar 28, 2014
@niden
Copy link
Member

niden commented Mar 28, 2014

I reopened it but I don't think it will work since the old 1.3.2 branch had a different hash.

@maxgalbu if you don't mind just re-tracking 1.3.2 on your local and then submitting it, it would be great!

Thanks!

@maxgalbu
Copy link
Contributor Author

done :)

phalcon pushed a commit that referenced this pull request Mar 31, 2014
criteria: fix issue #2157 and added tests
@phalcon phalcon merged commit c14720a into phalcon:1.3.2 Mar 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants