Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4720 from prisma/MongoIdsStoredTwice
Browse files Browse the repository at this point in the history
Do not store ids under id and _id when they are user provided
  • Loading branch information
do4gr committed Jul 5, 2019
2 parents 78ea445 + 2a201a5 commit 41042af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ trait NodeActions extends NodeSingleQueries {
case (_, _) => NodeAddress.forId(mutaction.model, id)
}

val nonListArgsWithId = nonListValues :+ ("_id", id)
val nonListArgsWithId = nonListValues.filter(p => p._1 != mutaction.model.idField_!.dbName) :+ ("_id", id)
val (nestedCreateFields, childResults) = embeddedNestedCreateDocsAndResults(mutaction, currentParent)
val doc = Document(nonListArgsWithId ++ listValues ++ inlineRelations) ++ nestedCreateFields

Expand Down

0 comments on commit 41042af

Please sign in to comment.