From 891f41efef605f5cfc44d8b64cccaa0a6434b0f9 Mon Sep 17 00:00:00 2001 From: Hellow2 Date: Mon, 13 Mar 2023 14:05:03 +0100 Subject: [PATCH] documented the merging --- documentation/objects.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/documentation/objects.md b/documentation/objects.md index d712a85..dd8de45 100644 --- a/documentation/objects.md +++ b/documentation/objects.md @@ -19,6 +19,12 @@ Additionally it provides an **Interface** to: ### DatabaseObject.merge() +To merge the data of two instances of the same type, the attributes defined in `DatabaseObject.COLLECTION_ATTRIBUTES` and `SIMPLE_ATTRIBUTES` are used. + +The simple attributes just get carried from the other instance, to the self instance. + +The collection attributes appends all elements from other.collection to self.collection, but ofc [checks if already exists](#collection). + ## Collection [music_kraken.objects.Collection](../src/music_kraken/objects/collection.py)