From 6a5f27b68c70b3b7688cb02c6a4c957c49baba17 Mon Sep 17 00:00:00 2001 From: Dave Wood Date: Fri, 6 Jun 2014 05:28:07 -0400 Subject: [PATCH] Fix issue when using unordered to-many relationship --- templates/machine.swift.motemplate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/machine.swift.motemplate b/templates/machine.swift.motemplate index 86b19c36..1f48e395 100644 --- a/templates/machine.swift.motemplate +++ b/templates/machine.swift.motemplate @@ -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$>!) {