vapor / fluent

Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
https://docs.vapor.codes/4.0/fluent/overview/
MIT License
1.32k stars 172 forks source link

No exact matches in call to instance method **'filter'** #734

Closed BackWorld closed 2 years ago

BackWorld commented 2 years ago

Describe the bug

build errors always in below codes:

let planets = try await Planet.query(on: req.db).filter(\.$name == "Earth")
            .all()

Environment

Additional context

ζˆͺ屏2021-11-21 δΈ‹εˆ4 32 19
0xTim commented 2 years ago

Have you got import Fluent in the file?

BackWorld commented 2 years ago

@0xTim You are genius bro and tks!