I have a query in Fluent Vapor that applies siblings filters based on metaTagIds. Here's the code snippet:
let queryBuilder = Attraction.query(on: req.db)
if let metaTagIds = attractionSearch.metaTagIds, metaTagIds.count > 0 {
queryBuilder.join(siblings: \.$metaTags)
queryBuilder.filter(MetaTag.self, \.$id ~~ metaTagIds)
}
After applying these siblings filters, I want to remove duplicate values from the queryBuilder. How can I achieve this in Fluent Vapor?
Any help or guidance would be appreciated. Thank you!