I am trying to build a list that will display multiple @Model
s. Let's just call them A
and B
.
Looking at both @Query
and FetchDescriptor
they only seem to operate on a single type. I want something like @Query<Both_A_and_B>
. Is that possible with the current version of SwiftData? Would subclassing(hate this approach already) work, something like that:
@Model
class Entity {}
@Model
class A: Entity {}
@Model
class B: Entity {}