Skip to content

Commit

Permalink
Fix issue when using unordered to-many relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveWoodCom committed Jun 6, 2014
1 parent 60c2c7e commit 6a5f27b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/machine.swift.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
extension _<$managedObjectClassName$> {

func add<$Relationship.name.initialCapitalString$>(objects: <$Relationship.immutableCollectionClassName$>) {
self.<$Relationship.name$>Set().unionOrderedSet(objects)
self.<$Relationship.name$>Set().union<$if Relationship.jr_isOrdered$>Ordered<$endif$>Set(objects)
}

func remove<$Relationship.name.initialCapitalString$>(objects: <$Relationship.immutableCollectionClassName$>) {
self.<$Relationship.name$>Set().minusOrderedSet(objects)
self.<$Relationship.name$>Set().minus<$if Relationship.jr_isOrdered$>Ordered<$endif$>Set(objects)
}

func add<$Relationship.name.initialCapitalString$>Object(value: <$Relationship.destinationEntity.managedObjectClassName$>!) {
Expand Down

0 comments on commit 6a5f27b

Please sign in to comment.