iphone - NSMutableOrderedSet for To-Many Relationship in Subclass -


when xcode creates managed subclass to-many relationship, types relationship member of class nsset, this:

class someobject: nsmanagedobject {      @nsmanaged var member: string      @nsmanaged var anotherone: int      @nsmanaged var relatedentities: nsset  } 

which makes creating new related entities arduous forced create mutable buffer, in:

let buffer = nsmutableset(set: someobject.relatedentities) buffer.addobject(newrelatedentity) someobject.relatedentities = nsset(set: buffer) 

my question: safe change type of relatedentities member nsmutaleset, eg:

@nsmanaged var relatedentities:  

for access addobjects method, or create problems in context/model/anything?

edit:

also, okay use

@nsmanaged var relatedentities: [relatedentity] 


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -