You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since FMMultivalueLink and FMSlotMultivalueLink inherit from OrderedCollection (#70), a lot of API has been inherited that can add or remove elements, or even set the entire inner collection directly.
As explained in the PR, these methods seem to work, but do not affect the opposite of the link.
This should be fixed to ensure that links remain in the correct state no matter what method is used.
Here is the (hopefully exhaustive) list of unsupported methods:
addFirst:
at:put:
insert:before: (see note)
removeIndex:
removeAllSuchThat:
removeFirst
removeLast
setCollection:
setContents:
A good practice is to handle the private method that is used by multiple public methods, thus reducing the amount of methods to handle.
For example, addLast: takes care of add:, addAllLast: and addNoSort:.
The same could be done with removeIndex: which would take care of remove:ifAbsent:, removeAt: and removeAtIndex:.
Note: insert:before: has a working extension in FASTRefactor. There is also a convenient replace: oldEntity with: newEntity, which is a new API not from Collection, but not sure if it should be brought over?
The text was updated successfully, but these errors were encountered:
Since FMMultivalueLink and FMSlotMultivalueLink inherit from OrderedCollection (#70), a lot of API has been inherited that can add or remove elements, or even set the entire inner collection directly.
As explained in the PR, these methods seem to work, but do not affect the opposite of the link.
This should be fixed to ensure that links remain in the correct state no matter what method is used.
Here is the (hopefully exhaustive) list of unsupported methods:
A good practice is to handle the private method that is used by multiple public methods, thus reducing the amount of methods to handle.
For example,
addLast:
takes care ofadd:
,addAllLast:
andaddNoSort:
.The same could be done with
removeIndex:
which would take care ofremove:ifAbsent:
,removeAt:
andremoveAtIndex:
.Note:
insert:before:
has a working extension in FASTRefactor. There is also a convenientreplace: oldEntity with: newEntity
, which is a new API not from Collection, but not sure if it should be brought over?The text was updated successfully, but these errors were encountered: