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

fixbug with eager root where #12

Merged
merged 1 commit into from
Jul 25, 2018
Merged

Conversation

sqlwwx
Copy link
Contributor

@sqlwwx sqlwwx commented Jul 25, 2018

fixbug

buildFilter(Person)
  .build({
    eager: {
      $where: {
        id: {
          $gt: 0
        },
        'pets.name': 'P90'
      }
     }
   })
eager object notation sqlite3 root model using related fields should filter using root field:
     select `Person`.* from `Person` inner join (select distinct `Person`.`id` from `Person` inner join `Animal` as `pets` on `pets`.`ownerId` = `Person`.`id` where (`id` > 0 and `pets`.`name` = 'P90')) a
s `filter_query` on `Person`.`id` = `filter_query`.`id` - SQLITE_ERROR: ambiguous column name: id

@coveralls
Copy link
Collaborator

coveralls commented Jul 25, 2018

Coverage Status

Coverage increased (+0.02%) to 98.165% when pulling 8d91c6b on sqlwwx:fixbug/eager into 207bacf on tandg-digital:master.

@jeff3yan
Copy link
Collaborator

Thanks for the pull request. I overlooked the case with ambiguous column names. I'll review it shortly but overall looks good.

@jeff3yan jeff3yan merged commit 31204ed into tandg-digital:master Jul 25, 2018
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