Comments (3)
This is probably an issue of the query builder generating an incorrect query, so would probably file this against the respective query builder repo
from edgedb.
@jackfischer Rewriting the query a little more naturally, I discovered that it seems to be a problem with the std::
prefix on the inner assert_single
If I do the following it still fails with QueryError: invalid reference to link property in top level shape
:
WITH
relationships := <json>$relationships
SELECT (FOR item IN json_array_unpack(relationships)
UNION (
assert_single((
UPDATE SurveyModule
FILTER .prismaID = <int32>(item["moduleId"])
SET {
questions += (
std::assert_single(( # 👈
SELECT detached Question {
@displayOrder := <std::int16>(item["questionDisplayOrder"])
}
FILTER .prismaID = <int32>(item["questionId"])))
)
}))
))
However, if I remove the std::
prefix, the query works:
WITH
relationships := <json>$relationships
SELECT (FOR item IN json_array_unpack(relationships)
UNION (
assert_single((
UPDATE SurveyModule
FILTER .prismaID = <int32>(item["moduleId"])
SET {
questions += (
assert_single(( # 👈
SELECT detached Question {
@displayOrder := <std::int16>(item["questionDisplayOrder"])
}
FILTER .prismaID = <int32>(item["questionId"])))
)
}))
))
Does that still seem like a query builder issue to you? If so, I'll go file it on the Typescirpt repo.
Thanks for your help.
from edgedb.
In fact, simpler queries like the following are also giving me the same error because of the std::
prefix.
update SurveyModule
filter .prismaID = <int32>3
set {
questions += (
std::assert_single(
(
select detached Question {
@displayOrder := <int16>3
}
filter .id = <uuid>"badeaec0-ae44-11ee-a055-5bf3e38d49ce"
)))
}
from edgedb.
Related Issues (20)
- Extraordinarily atrocious performance from triggers when touching a multi link
- Multiple `update` in single query HOT 2
- Feature Request: Nested Update
- Rust: Bring Back Vec<u8> Bytes
- Misleading error when using incorrect type on backlink
- Get rid of `astmatch` infrastructure
- Nested exclusive constraints do not get understood as singular HOT 3
- Conditional nested inserts in for loops are quadratic
- ISE: cannot create root rvar for non-object path HOT 1
- Do something sensible when trying to patch on multi-tenant
- Add example of why and how to use delegated constraints in inheritance constraints docs
- If auth config is invalid, we should fail any auth related endpoint
- Poor error message when applying migration with required value being set to {} HOT 4
- Unable to group by link property HOT 1
- Support annotations on computeds and backlinks
- Aliasing the PKCE Parameter "challenge" for RFC Alignment HOT 3
- Performance issue with in / = on indexed property HOT 3
- The AI base chat gives answer in old syntax with -> rather than new syntax with colons.
- Add LetsEncrypt integration for self-hosting
- Feature request: "Try parse" family of functions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edgedb.