Sort on the @relationship property wrapper

Hello Developer Support,

Let's say I have the following models. Is there a way to have dataSet pre-sorted by swiftData?


@Model
Struct Capture {
   let someInfo: String

   @Relationship(.unique, deleteRule: .cascade)  // some way of sorting by CoolPoint.date
   let dataSet: [CoolPoint]
}

@Model
struct CoolPoint {
   let point: Int
   let date: Date
}
Sort on the @relationship property wrapper
 
 
Q