Post marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliessolved.tooltip
Replied In
SwiftData Query relationships not working
You need to add @Relationship to var students: [Student] in Department model, also:
import Foundation
import SwiftData
@Model
class Department {
...
@Relationship var students: [Student]
...
}