Bug: Edge inserted via INSERT cannot be queried with -> #3247
Labels
bug
Something isn't working
topic:schema
This is related to schema definition and enforcement
topic:surrealql
This is related to the SurrealQL query language
Describe the bug
I am using
INSERT
instead ofRELATE
because I am inserting many relationships at once and some relations may already exist (INSERT IGNORE INTO tagged ($values)
where$values
is an array of{in: thing, out: thing
). The resulting table looks the same as if I had used RELATE, but querying does not work as intended.If this is intended, then a warning should be added to the documentation that even though the result of adding a edge via
INSERT
looks identical toRELATE
, theINSERT
ed edges cannot be queried with->
.Steps to reproduce
I add tags and images to the database, and tag image 1 and 3 with car, but only image 3 is picked up by the -> queries:
both have the same structure
select all images that do not have any tags; this returns image 1 and 2 - it should only return image 2
select all images that have the car tag; this returns image 3 - it should also return image 1
Expected behaviour
See comments in "steps to reproduce"
SurrealDB version
1.0.2 rust crate (not using the server, but embedded)
Contact Details
github
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: