-
-
Notifications
You must be signed in to change notification settings - Fork 499
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(core): quote custom type aliases #1415
Conversation
Thanks, can you also fix the failing test?
Even better would be to make it work so it generates this instead:
|
I tried running the tests but I could not get them to work. |
I guess you saw the contributing guide? Running tests should be quite easy, just run docker-compose and Will be happy to merge this, if you say it is enough, but I'd expect we need to quote it inside the function too (as noted above). edit: but this should be enough for the issue you had with mapping the results... |
Yes, I read the guide, it said the I'm trying to fix the other quotes now if you wait I may be able to get that in too. |
Nope, you misread it. Here is what it says:
There is just a note that on windows you should check their docs as it might be more complicated then just running the command. Maybe I should rephrase that a bit (move the note about windows to a side note under the code snippet maybe). |
Yes, I misread it. It was 1 am I should have gone to sleep instead. |
Ok, I tried prefixing the field names but I'm getting a lot of broken tests with double and triple quoted identifiers, and now I realize I'm even getting quoted asterisks. I think there's just too many particular cases and I wouldn't be comfortable pushing this even with tests passing. I would like to help getting that fixed but it requires more work, if you think this PR is good enough to merge it would solve at least some problems. |
Sure, as said, for the issue you had this should be enough. Thanks anyway :] |
My custom properties are not getting mapped well because in Postgres casing is ignored for identifiers unless quoted.
The mapper uses the alias to map the results back to the entity and the results are getting lost because it's all lower case.
In other words, the compiled mapping function fails:
Because
result.mycustomprop
is not matched against the rule, and the generic treatment at the end of the mapping function also fails because it mappes the value into a property that doesn't exist:I added the plaform quotes for the custom type alias.