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 property renaming for nested and infix queries #875

Merged
merged 2 commits into from
Sep 10, 2017
Merged

Conversation

fwbrasil
Copy link
Collaborator

@fwbrasil fwbrasil commented Sep 9, 2017

Fixes #521

Problem

The custom schema is lost when there's a nested query or an infix.

Solution

Change the property renaming to consider nested and infix queries.

Checklist

  • Unit test all changes
  • Update README.md if applicable
  • Add [WIP] to the pull request title if it's work in progress
  • Squash commits that aren't meaningful changes
  • Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

case q: Action => applySchema(q)
case q: Query => applySchema(q)
case q =>
CollectAst.byType[Entity](q) match {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a little weak, but I couldn't think of a scenario where it'd break.

@fwbrasil fwbrasil merged commit 98eb3f2 into master Sep 10, 2017
@fwbrasil fwbrasil deleted the fix-521 branch September 10, 2017 21:40
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.

Lost schema mapping when using infix (subqueries)
2 participants