mogenerator icon indicating copy to clipboard operation
mogenerator copied to clipboard

Fixes for Swift to-many accessors, Swift mutableSets

Open apparentsoft opened this issue 4 years ago • 0 comments

Summary of Changes

Machine Swift template had several long standing issues, one of which was absolutely incorrect and some that needed updates or improvements.

Specifically, the mutable relationship accessors were not correct: they just returned a mutable copy of a set instead of returning the actual underlying mutable set provided by the APIs (and where are correctly implemented in the Obj-C code).

Later these same accessors were used in manually written add/removeObjects accessors, which while worked was not done using underlying collections and thus less efficient. Also, these accessors are now generated by the compiler, using @NSManaged attribute. See #332 .

Addresses

#332

apparentsoft avatar Apr 09 '20 02:04 apparentsoft