Fix UPSERT bug on camelCase PK column
This commit is contained in:
committed by
Steve Chávez
parent
9ea7529f30
commit
37e7398a85
@@ -288,7 +288,7 @@ requestToQuery schema _ (DbMutate (Insert mainTbl pkCols p@(PayloadJSON _ pType
|
||||
-- Only used for PUT
|
||||
("WHERE " <> intercalate " AND " (pgFmtLogicTree (QualifiedIdentifier "" "_") <$> logicForest)) `emptyOnFalse` null logicForest],
|
||||
maybe "" (\x -> (
|
||||
"ON CONFLICT(" <> intercalate ", " pkCols <> ") " <> case x of
|
||||
"ON CONFLICT(" <> intercalate ", " (pgFmtIdent <$> pkCols) <> ") " <> case x of
|
||||
IgnoreDuplicates ->
|
||||
"DO NOTHING"
|
||||
MergeDuplicates ->
|
||||
|
||||
Reference in New Issue
Block a user