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

Fix Relationship#grandchildren #18239

Merged
merged 1 commit into from
Nov 29, 2018

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Nov 28, 2018

pulled out of #18235

grandchild_conditions did not properly building sql.
The sql would never return any rows

before

(
          relationship LIKE "child_ancestry/%"    -- grand child or lower
  AND NOT relationship LIKE "child_ancestry/%"    -- NOT grand child or lower (BUG)
)

after

(
          relationship LIKE "child_ancestry/%"    -- grand child or lower
  AND NOT relationship LIKE "child_ancestry/%/%"  -- NOT great grand child or lower
)

Now it returns the correct nodes.
Also of note, this now generates the same sql declared in this method's comment.

Copy link
Member

@NickLaMuro NickLaMuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this, thanks for splitting it out! 👍

@kbrock kbrock force-pushed the relationship_grandchildren_fix branch from c6d3285 to d3ae76d Compare November 29, 2018 19:42
grandchild_conditions did not properly building sql.
The sql would never return any rows

Now it returns the correct nodes
@kbrock kbrock force-pushed the relationship_grandchildren_fix branch from d3ae76d to fd1a3b4 Compare November 29, 2018 19:46
@miq-bot
Copy link
Member

miq-bot commented Nov 29, 2018

Checked commit kbrock@fd1a3b4 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

@Fryguy Fryguy merged commit bf46b38 into ManageIQ:master Nov 29, 2018
@Fryguy Fryguy added this to the Sprint 100 Ending Dec 3, 2018 milestone Nov 29, 2018
@Fryguy
Copy link
Member

Fryguy commented Nov 29, 2018

@kbrock Why hammer/no?

@kbrock kbrock deleted the relationship_grandchildren_fix branch November 29, 2018 21:39
@Fryguy Fryguy self-assigned this Nov 29, 2018
simaishi pushed a commit that referenced this pull request Nov 30, 2018
Fix Relationship#grandchildren

(cherry picked from commit bf46b38)
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit 65db1f2b79813af9790ec5e3a0444a896a20dc1c
Author: Jason Frey <[email protected]>
Date:   Thu Nov 29 16:38:48 2018 -0500

    Merge pull request #18239 from kbrock/relationship_grandchildren_fix
    
    Fix Relationship#grandchildren
    
    (cherry picked from commit bf46b38c5834f5ae284131e293b339c0826d0771)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants