Fork me on GitHub
#keechma
<
2020-08-11
>
ferossgp11:08:57

Hey! 👋 I have a question on keechma-entitydb In this example https://github.com/keechma/keechma-entitydb#querying-relationships If I want to add to this entity a new link later

{:id 1
 :title "Note #1"
 :links [{:id 1
          :url ""}
         {:id 2
          :url ""}]} 
Should I insert the new again including the vector of 3 links (2 old, and the new one), or is there a way to prepend/append directly?

mihaelkonjevic19:08:04

@ferossgp the expectation is to insert a vector of 3 links. Entitydb will replace whatever is on the :links key with a new collection. We don’t have a prepend / append functionality atm, but it could probably be built pretty easily. Can you open an issue for that on the repo?

👍 3