In Xcode Version 15.0 beta (15A5160n) this predicate will not build:
let thisPredicate = #Predicate<Ledgers> {
($0.myStore != nil)
}
The definition of .myStore in the Ledgers class is:
var myStore: Stores?
an optional relationship. Is there anyway to test for nil optional relationships in SwiftData?
The inverse relationship in Stores is:
@Relationship(.deny, inverse: \Ledgers.myStore) var myReceipts: [Ledgers]