Skip to content
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

InternalServerError: invalid request for non-scalar path when using a subtype #8357

Open
Gobot1234 opened this issue Feb 20, 2025 · 0 comments

Comments

@Gobot1234
Copy link
Contributor

  • EdgeDB Version: v7 nightly

Steps to Reproduce:

with reps := (select users::Rep filter .username in {'mea21jbh', 'coa20gcs'}),
carrie := (select assert_single(users::Rep filter .first_name = "Carrie")),
for user in reps union (
    update user
    set {
        training += (
            select .training {
                @created_at := @created_at,
                @infraction := @infraction,
                @in_person_created_at := datetime_of_statement(),
                @in_person_signed_off_by := assert_exists(carrie.id),
            }
            filter .id = <uuid>$training_id
        )
    }
)

Raises

InternalServerError: invalid request for non-scalar path (__derived__::user@w~3) iterator

Whereas changing users::Rep to users::User makes the error disappear

with reps := (select users::Users filter .username in {'mea21jbh', 'coa20gcs'}),
carrie := (select assert_single(users::Rep filter .first_name = "Carrie")),
for user in reps union (
    update user
    set {
        training += (
            select .training {
                @created_at := @created_at,
                @infraction := @infraction,
                @in_person_created_at := datetime_of_statement(),
                @in_person_signed_off_by := assert_exists(carrie.id),
            }
            filter .id = <uuid>$training_id
        )
    }
)

Schema:

type User;
type Rep extending User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant