Skip to content

Comparisons in .where cause crash #166

Open
@vlourme

Description

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!

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions