When using couchbeam_doc:extend(PropList, Doc) and saving the doc,
I'm getting a doc with duplicated fields.
This can easily be checked with couchbeam_db:open_doc. The web admin doesn't show duplicated fields.
A possible fix is:
NewProps2 = [{Key, proplists:get_value(Key,NewProps,Val)} || {Key,Val} <- OldProps]
OldProps is from the Doc and NewProps are the props you want to append/override
When using couchbeam_doc:extend(PropList, Doc) and saving the doc, I'm getting a doc with duplicated fields. This can easily be checked with couchbeam_db:open_doc. The web admin doesn't show duplicated fields.
A possible fix is: NewProps2 = [{Key, proplists:get_value(Key,NewProps,Val)} || {Key,Val} <- OldProps]
OldProps is from the Doc and NewProps are the props you want to append/override