merge_target_lists(persisted, memory) private

We have some records loaded from the database (persisted) and some that are in-memory (memory). The same record may be represented in the persisted array and in the memory array.

So the task of this method is to merge them according to the following rules:

* The final array must not have duplicates
* The order of the persisted array is to be preserved
* Any changes made to attributes on objects in the memory array are to be preserved
* Otherwise, attributes should have the value found in the database
Show source
Register or log in to add new notes.