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

'$' on nested wheres #4849

Closed
ashleyschuett opened this Issue Nov 12, 2015 · 1 comment

Comments

2 participants
@ashleyschuett

ashleyschuett commented Nov 12, 2015

db.Spectrum.findAll({
  include: [
    {
      model: db.Varietal,
      include : [
        {
          model : db.Wine
        }
      ]
    }
  ],
  where: {
    '$Varietals.Wines.restaurant_id$': restaurant_id,
    '$Varietals.Wines.owner_id$': null
  },
  group : ['specID']
});

This query should produce a where statement that looks like

WHERE `Varietals.Wines`.`restaurant_id` = 16

but instead produces

WHERE `Varietals`.`Wines`.`restaurant_id` = 16

Which gives an invalid column error.

@mickhansen mickhansen added the bug label Nov 12, 2015

@mickhansen mickhansen self-assigned this Nov 12, 2015

@mickhansen

This comment has been minimized.

Contributor

mickhansen commented Nov 12, 2015

It was intended this way, but i'm not sure why, maybe schemas

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