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

case class mapper for maps #60

Merged
merged 2 commits into from Jan 11, 2020
Merged

Conversation

geoffjohn11
Copy link
Contributor

@geoffjohn11 geoffjohn11 commented Jan 10, 2020

closes #26

@geoffjohn11
Copy link
Contributor Author

geoffjohn11 commented Jan 10, 2020

The other use case of Tuple to Map isn't yet complete, but map projection to case class had a bit less to it. Two test cases are still commented out in MapSessionSpec. Any thoughts on this?

Copy link
Contributor

@BalmungSan BalmungSan left a comment

Choose a reason for hiding this comment

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

Hi @geoffjohn11 Thanks for this!!


Could you make sure that you enable the "allow changes from maintainers" option in this PR, I would like to make a simple style change and ensure that collectMapFields is tail-recursive before merging.

@geoffjohn11
Copy link
Contributor Author

Hi @geoffjohn11 Thanks for this!!

Could you make sure that you enable the "allow changes from maintainers" option in this PR, I would like to make a simple style change and ensure that collectMapFields is tail-recursive before merging.

That option is checked, so you should be able to make edits.

collectMapFields is not tail-recursive, so the annotation will cause a compilation failure, but I can take a look at making it tailrec.

@BalmungSan
Copy link
Contributor

BalmungSan commented Jan 11, 2020

@geoffjohn11 I just remembered that Neo4j doesn't support nested maps, thus your recursive step wasn't necessary.

When I removed that, I discovered that an Entity is basically a Map, so we could reuse our old logic (with some minor tweaks).

So, in the end, we didn't need to do anything 😆
However, if it hadn't been for this PR we probably would never notice that.
Thank you very much for your interest in the project 👍

@BalmungSan BalmungSan merged commit 1504d2a into neotypes:master Jan 11, 2020
@geoffjohn11
Copy link
Contributor Author

@geoffjohn11 I just remembered that Neo4j doesn't support nested maps, thus your recursive step wasn't necessary.

When I removed that, I discovered that an Entity is basically a Map, so we could reuse our old logic (with some minor tweaks).

So, in the end, we didn't need to do anything
However, if it hadn't been for this PR we probably would never notice that.
Thank you very much for your interest in the project

Interesting! Thanks for your help. I'll try to get the two other test in MapSessionSpec working.

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.

Feature: case class mapper for maps
2 participants