SwiftData's #Predicate macro looks like pure Swift but gets compiled into something else entirely. Some things crash at runtime, some silently return nothing, and !value can behave differently to value == false. https://www.hackingwithswift.com/quick-start/swiftdata/how-to-filter-swiftdata-results-with-predicates
Hacking with Swift
How to filter SwiftData results with predicates - a free SwiftData by Example tutorialLearn Swift coding for iOS with these free tutorials