Closed 0c12a4c9-4c00-4211-8531-353dbff93969 closed 1 year ago
Hmm, I'll take a closer look at this tomorrow to see if I messed up the insertion order and let you know once it's fixed if that's the case. Otherwise to quickly resolve the issue you could quickly delete the Person objects that link to cities and then delete the City and reinsert, or if feeling a bit more ambitious (since it's from a later chapter) you could change the deletion policy and do a migration which will then let you delete the City even if it's being linked to:
Most likely I didn't follow the tutorial to the letter, that's my guess. If it helps, the player character had the old Bistritz linked.
It's interesting that there's no inverse relationship from Place
back to Person { places_visited}
to select persons that visited a place, but maybe that comes at a later point in the tutorial.
As an additional note: the outputs for select City { ... };
in chapter 3 show only one Bistritz in the code snippets on the website while someone who followed the tutorial sees Bistritz two times in the output of their local DB (since deleting happens in the last step).
I solved the problem by unlinking the old Bistritz entry through the edgedb ui
It does indeed come up later, that's known as a backlink and it shows up in Chapter 14. It's cool to see that you're already feeling a need for something that does get addressed later in the book.
Looks like it wasn't just you! At this point in the book the reader doesn't know how to modify deletion policies or update objects yet so the solution is to not give the PC a link to the City objects and then to temporarily delete Jonathan Harker (along with some notes that this process gets smoother later on when the reader knows more).
https://github.com/edgedb/easy-edgedb/commit/23e5db1811308a340b2f61ffeea597ac32292b6e
Awesome, thanks a lot
When running this command
delete City filter .id = <uuid>'d1e38192-0bd6-11ee-ba45-d7ecb20723cf';
(obviously with the uuid from my database) I get the following error:My schema is this:
select City {*} filter .name = "Bistritz"
returnsI copied the above code from the edgedb ui which replaced
{}
withnull
for some reason. That's when I use the copy button.Not sure what the problem is here. I guess I mistyped something?