Wrong query parameter for relations
See original GitHub issueWhen running a query such as
const org: Organisation = ...
const found = await connection.manager.findOne(User, { organisation: org });
found
is always undefined
because the WHERE clause in the run query is:
WHERE "User"."organisationId"=$1 -- PARAMETERS: [{"name":"The Fancy Team","id":2}]
when it should be:
WHERE "User"."organisationId"=$1 -- PARAMETERS: [2]
See test case here: https://gist.github.com/angexis/ec9014a9d7a45ebb14dc5e3feea9e118
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Find entity with many-to-one relationship uses wrong id for ...
Look guys, I need some help with Room on Android. In my project there are two entities, Item and Unit of Measure. The...
Read more >How do I see the query parameter on the error page
I have a GET request that is failing and I believe it's because some clients are sending us invalid query parameters.
Read more >Incorrect construction of query with innerJoin and ... - GitHub
In MysqlDriver#escapeQueryWithParameters the :id placeholder is converted into a question mark and the value is appended to the parameter list, ...
Read more >Error when activate custom OVS created for custom BO
When I create an OVS screen for custom BO and I try to activate it for the first time, I get the following...
Read more >Use query parameters to customize responses - Microsoft Graph
Microsoft Graph provides optional query parameters that you can use to specify and control the amount of data returned in a response.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
(and OK, I will do a PR if I find another fix)
Hello @pleerock
Indeed, this is working in the
next
branch (hadn’t noticed that branch until you mentioned) and using typeorm@next (0.2.0-alpha.10).So I guess I can close this bug now. Thanks!