-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Custom Types with SQL fragments ignored in populate with joined strategy #1594
Comments
never mind. I just found the convertCustomTypes option |
It turns out that the option convertCustomTypes doesn't work on findOne? When I'm calling something like:
the resulting SQL statement doesn't contain 'ST_AsText(geometry)' |
This is not how you report a bug. You need to provide actual reproduction, ideally as a test case, but one way or the other, it needs to be complete and verifiable. Here are passing tests that do work with https://github.com/mikro-orm/mikro-orm/blob/master/tests/features/custom-types.test.ts
This sounds like you are using joined loading strategy? That is important thing to note, please provide something complete. Ideally try to extend the existing test to reproduce it. |
I'm sorry, I don't know how to set that up. But fortunately it was indeed fixed by setting the loading strategy to SELECT_IN |
Let's keep this open, it sounds like a bug for sure. |
Describe the bug
I've defined a custom type but when using populate the 'convertToJSValueSQL' method isn't used to create the SQL statement
This should create SQL statements using 'st_AsText(geometry)'. However when using populate the SQL statement just says '"p1.geometry" as "p1__geometry"'
The text was updated successfully, but these errors were encountered: