diff --git a/packages/store/addon/-private/system/record-array-manager.js b/packages/store/addon/-private/system/record-array-manager.js index 81f2611968d..5f9b574ca3f 100644 --- a/packages/store/addon/-private/system/record-array-manager.js +++ b/packages/store/addon/-private/system/record-array-manager.js @@ -418,28 +418,15 @@ const updateLiveRecordArray = function updateLiveRecordArray(store, recordArray, } if (identifiersToAdd.length > 0) { - pushIdentifiers(recordArray, identifiersToAdd, internalModelFactoryFor(store)); + recordArray._pushIdentifiers(identifiersToAdd); } if (identifiersToRemove.length > 0) { - removeIdentifiers(recordArray, identifiersToRemove, internalModelFactoryFor(store)); + removeIdentifiers(recordArray, identifiersToRemove); } }; -const pushIdentifiers = function pushIdentifiers(recordArray, identifiers, cache) { - if (!REMOVE_RECORD_ARRAY_MANAGER_LEGACY_COMPAT && !recordArray._pushIdentifiers) { - // deprecate('not allowed to use this intimate api any more'); - recordArray._pushInternalModels(identifiers.map(i => peekIMCache(cache, i))); - } else { - recordArray._pushIdentifiers(identifiers); - } -}; -const removeIdentifiers = function removeIdentifiers(recordArray, identifiers, cache) { - if (!REMOVE_RECORD_ARRAY_MANAGER_LEGACY_COMPAT && !recordArray._removeIdentifiers) { - // deprecate('not allowed to use this intimate api any more'); - recordArray._removeInternalModels(identifiers.map(i => peekIMCache(cache, i))); - } else { - recordArray._removeIdentifiers(identifiers); - } +const removeIdentifiers = function removeIdentifiers(recordArray, identifiers) { + recordArray._removeIdentifiers(identifiers); }; const removeFromAdapterPopulatedRecordArrays = function removeFromAdapterPopulatedRecordArrays(store, identifiers) { @@ -451,10 +438,9 @@ const removeFromAdapterPopulatedRecordArrays = function removeFromAdapterPopulat const removeFromAll = function removeFromAll(store, identifier) { identifier = getIdentifier(identifier); const recordArrays = recordArraysForIdentifier(identifier); - const cache = internalModelFactoryFor(store); recordArrays.forEach(function(recordArray) { - removeIdentifiers(recordArray, [identifier], cache); + removeIdentifiers(recordArray, [identifier]); }); recordArrays.clear();