fix: unexpected results when embedding the same table twice

This commit is contained in:
Laurence Isla
2026-04-29 09:10:48 +00:00
committed by Wolfgang Walther
parent ea08a4d767
commit 5f6f7dca44
5 changed files with 43 additions and 2 deletions
+1 -1
View File
@@ -996,7 +996,7 @@ updateNode f (targetNodeName:remainingPath, a) (Right (Node rootNode forest)) =
updateNode f (remainingPath, a) (Right target)
where
findNode :: Maybe ReadPlanTree
findNode = find (\(Node ReadPlan{relName, relAlias} _) -> relName == targetNodeName || relAlias == Just targetNodeName) forest
findNode = find (\(Node ReadPlan{relName, relAlias} _) -> fromMaybe relName relAlias == targetNodeName) forest
mutatePlan :: Mutation -> QualifiedIdentifier -> ApiRequest -> SchemaCache -> ReadPlanTree -> Either Error MutatePlan
mutatePlan mutation qi ApiRequest{iPreferences=Preferences{..}, ..} SchemaCache{dbTables, dbRepresentations} readReq =