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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparisons in .where cause crash #166

Open
vlourme opened this issue Jun 17, 2020 · 0 comments
Open

Comparisons in .where cause crash #166

vlourme opened this issue Jun 17, 2020 · 0 comments

Comments

@vlourme
Copy link

vlourme commented Jun 17, 2020

Hi 馃憢

I'm facing a weird issue, when I run this code:

// initial.id is a UUID

let search = Search<Entity>(graph: Globals.graph).where(
    .type("Customers", using: &&)
        && "id" == initial.id as CVarArg // <- Is it the good way?
)

This causes a crash (here is the crashlog: https://pastebin.com/uk6em3p1).

But if I run this code, it works:

let search = Search<Entity>(graph: Globals.graph).where(.type("Customers"))
let entity = search.sync().filter {
    $0["id"] as! UUID == initial.id
}

Am I doing something wrong with the new API or is it a library issue?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant