Hi everyone, I am currently migrating from Vapor 3 to Vapor 4 and run into a problem in Fluent.
How could I migrate that “JOIN” to Fluent4? I have tried several ways but I have not been able to find the solution.
let requestTotal: EventLoopFuture = OMOrderModel.query(on: parameters.connection)
.join(\OMCustomerModel.id, to: \OMOrderModel.customerID)
.filter(\OMCustomerModel.name, .like, name.prefixQuery)
Basically I apply a filter by name to the “JOIN”. But the name field corresponds to my parent table.
I hope someone I can help me. Thank you very much.