diff --git a/Database/Persist/TH.hs b/Database/Persist/TH.hs
--- a/Database/Persist/TH.hs
+++ b/Database/Persist/TH.hs
@@ -739,17 +739,18 @@
 persistFieldFromEntity :: MkPersistSettings -> EntityDef a -> Q [Dec]
 persistFieldFromEntity mps e = do
     ss <- [|SqlString|]
-    let columnNames = map (unpack . unHaskellName . fieldHaskell) (entityFields e)
     obj <- [|\ent -> PersistMap $ zip (map pack columnNames) (map toPersistValue $ toPersistFields ent)|]
     fpv <- [|\x -> let columns = HM.fromList x
-                   in fromPersistValues $ map (\name -> 
-                                                  case HM.lookup name columns of
-                                                      Just v -> 
-                                                          case fromPersistValue v of
-                                                              Left e' -> error $ unpack e'
-                                                              Right r -> r
-                                                      Nothing -> error $ "Missing field: " `mappend` unpack name) (map pack columnNames)|]
-    let typ = genericDataType mps (pack entityName) $ VarT $ mkName "backend"
+                    in fromPersistValues $ map
+                         (\(nulled, name) ->
+                            case HM.lookup name columns of
+                                Just v -> case fromPersistValue v of
+                                    Left e' -> error $ unpack e'
+                                    Right r -> r
+                                Nothing -> if nulled then PersistNull
+                                    else error $ "Missing field: " `mappend` unpack name)
+                         (zip maybeColumns $ map pack columnNames)
+          |]
 
     compose <- [|(<=<)|]
     getPersistMap' <- [|getPersistMap|]
@@ -765,7 +766,11 @@
             ]
         ]
     where
+      typ = genericDataType mps (pack entityName) $ VarT $ mkName "backend"
       entityName = (unpack $ unHaskellName $ entityHaskell e)
+      entFields = entityFields e
+      columnNames  = map (unpack . unHaskellName . fieldHaskell) entFields
+      maybeColumns = map ((== Nullable ByMaybeAttr) . nullable . fieldAttrs) entFields
 
 -- | Apply the given list of functions to the same @EntityDef@s.
 --
diff --git a/persistent-template.cabal b/persistent-template.cabal
--- a/persistent-template.cabal
+++ b/persistent-template.cabal
@@ -1,5 +1,5 @@
 name:            persistent-template
-version:         1.3.1
+version:         1.3.1.1
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
