Skip to content
This repository
Browse code

Don't hard-code id for update (#102)

  • Loading branch information...
commit 5006da57702ccf5da57ccf071f2bc4d08cda0501 1 parent dbef330
Michael Snoyman snoyberg authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 persistent/Database/Persist/Query/GenericSql.hs
4 persistent/Database/Persist/Query/GenericSql.hs
@@ -58,7 +58,9 @@ instance (MonadResource m, MonadLogger m) => PersistQuery (SqlPersist m) where
58 58 , escapeName conn $ entityDB t
59 59 , " SET "
60 60 , T.intercalate "," $ map (go' . go) upds
61   - , " WHERE id=?"
  61 + , " WHERE "
  62 + , escapeName conn $ entityID t
  63 + , "=?"
62 64 ]
63 65 execute' sql $
64 66 map updatePersistValue upds `mappend` [unKey k]

0 comments on commit 5006da5

Please sign in to comment.
Something went wrong with that request. Please try again.