diff --git a/esqueleto.cabal b/esqueleto.cabal
--- a/esqueleto.cabal
+++ b/esqueleto.cabal
@@ -1,5 +1,5 @@
 name:                esqueleto
-version:             2.0.0
+version:             2.0.1
 synopsis:            Type-safe EDSL for SQL queries on persistent backends.
 homepage:            https://github.com/prowdsponsor/esqueleto
 license:             BSD3
@@ -11,6 +11,8 @@
 build-type:          Simple
 cabal-version:       >=1.8
 description:
+  This version is a beta release that works with the persistent-2.0 beta.
+  .
   @esqueleto@ is a bare bones, type-safe EDSL for SQL queries
   that works with unmodified @persistent@ SQL backends.  Its
   language closely resembles SQL, so you don't have to learn
@@ -92,7 +94,7 @@
     , QuickCheck
     , hspec               >= 1.8
     , persistent-sqlite   >= 2.0 && < 2.1
-    , persistent-template >= 2.0 && < 2.1
+    , persistent-template >= 2.0.3.2 && < 2.1
     , monad-control
     , monad-logger        >= 0.3
 
@@ -104,7 +106,7 @@
         postgresql-simple     >= 0.2
       , postgresql-libpq      >= 0.6
       , persistent-postgresql >= 2.0
-    
+
     cpp-options: -DWITH_POSTGRESQL
 
   if flag(mysql)
diff --git a/src/Database/Esqueleto/Internal/Sql.hs b/src/Database/Esqueleto/Internal/Sql.hs
--- a/src/Database/Esqueleto/Internal/Sql.hs
+++ b/src/Database/Esqueleto/Internal/Sql.hs
@@ -970,7 +970,7 @@
       where
         process ed = uncommas $
                      map ((name <>) . fromDBName info) $
-                     (entityID ed:) $
+                     (sqlIdName ed:) $
                      map fieldDB $
                      entityFields ed
         -- 'name' is the biggest difference between 'RawSql' and
