ManagedModels
ManagedModels copied to clipboard
Ordered Relationships, how?
Some support for NSOrderedSet is prepared in the codebase, need to test this and check what actually works.
A problem w/ NSOrderedSet is the lack of an associated type, i.e. it isn't a NSOrderedSet<T>. It can be subclassed in Swift like:
final class OrderedSet<T>: NSOrderedSet
but then the OrderedSet<T> can't be used w/ @NSManaged? (something about OrderedSet<T> can't be used in ObjC).
So the minimal thing would be support for such:
@Model class Group: NSManagedObject {
@Relationship(inverse: \Item.group)
var items : NSOrderedSet
}
The target model type could be provided by the inverse.