diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
 ## Unreleased changes
 
+## 2.12.0.0
+
+* Decomposed `HaskellName` into `ConstraintNameHS`, `EntityNameHS`, `FieldNameHS`. Decomposed `DBName` into `ConstraintNameDB`, `EntityNameDB`, `FieldNameDB` respectively. [#1174](https://github.com/yesodweb/persistent/pull/1174)
+
 ## 2.0.3.5
 
 * Tighter version bounds on `persistent` and `persistent-template`.
diff --git a/persistent-test.cabal b/persistent-test.cabal
--- a/persistent-test.cabal
+++ b/persistent-test.cabal
@@ -1,5 +1,5 @@
 name:            persistent-test
-version:         2.0.3.5
+version:         2.12.0.0
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -60,8 +60,7 @@
 
     build-depends: 
         base                     >= 4.9       && < 5
-      , persistent               >= 2.11      && < 2.12
-      , persistent-template      >= 2.9       && < 2.10
+      , persistent               >= 2.12      && < 2.13
       , aeson                    >= 1.0
       , blaze-html               >= 0.9
       , bytestring               >= 0.10
diff --git a/src/ForeignKey.hs b/src/ForeignKey.hs
--- a/src/ForeignKey.hs
+++ b/src/ForeignKey.hs
@@ -92,6 +92,11 @@
     previous Chain2Id Maybe noreference
     Foreign Chain2 OnDeleteCascade fkChain previous References Id
     deriving Show Eq
+
+Chain3
+    name Int
+    previous Chain3Id Maybe OnDeleteCascade
+    deriving Show Eq
 |]
 
 specsWith :: (MonadIO m, MonadFail m) => RunDb SqlBackend m -> Spec
@@ -180,12 +185,20 @@
         cs <- selectList [] []
         let expected = [] :: [Entity Chain2]
         cs @== expected
+    it "deletes cascades with field self reference to the whole chain" $ runDb $ do
+        k1 <- insert $ Chain3 1 Nothing
+        k2 <- insert $ Chain3 2 (Just k1)
+        insert_ $ Chain3 3 (Just k2)
+        delete k1
+        cs <- selectList [] []
+        let expected = [] :: [Entity Chain3]
+        cs @== expected
 
     describe "EntityDef" $ do
         let ed =
                 entityDef (Proxy @SimpleCascadeChild)
             isRefCol =
-                (HaskellName "ref" ==) . fieldHaskell
+                (FieldNameHS "ref" ==) . fieldHaskell
             expected = FieldCascade
                 { fcOnUpdate = Nothing
                 , fcOnDelete = Just Cascade
diff --git a/src/RawSqlTest.hs b/src/RawSqlTest.hs
--- a/src/RawSqlTest.hs
+++ b/src/RawSqlTest.hs
@@ -141,7 +141,7 @@
         liftIO $ ret @?= [(Single (1::Int), Single (2::Int), Single (3::Int), Single (4::Int), Single (5::Int), Single (6::Int), Single (7::Int), Single (8::Int), Single (9::Int), Single (10::Int), Single (11::Int), Single (12::Int), Single (13::Int), Single (14::Int), Single (15::Int))]
 
 getEscape :: MonadReader SqlBackend m => m (Text -> Text)
-getEscape = asks ((. DBName) . connEscapeName)
+getEscape = asks connEscapeRawName
 
 caseCommitRollback :: Runner SqlBackend m => RunDb SqlBackend m -> Assertion
 caseCommitRollback runDb = runDb $ do
diff --git a/src/RenameTest.hs b/src/RenameTest.hs
--- a/src/RenameTest.hs
+++ b/src/RenameTest.hs
@@ -77,7 +77,7 @@
         it "LowerCaseTable has the right sql name" $ do
             fieldDB (entityId (entityDef (Proxy @LowerCaseTable)))
                 `shouldBe`
-                    DBName "my_id"
+                    FieldNameDB "my_id"
 
     it "user specified id, insertKey, no default=" $ runDb $ do
         let rec2 = IdTable "Foo2" Nothing
diff --git a/src/TreeTest.hs b/src/TreeTest.hs
--- a/src/TreeTest.hs
+++ b/src/TreeTest.hs
@@ -43,27 +43,27 @@
     describe "entityDef" $ do
         let EntityDef{..} = entityDef (Proxy :: Proxy Tree)
         it "has the right haskell name" $ do
-            entityHaskell `shouldBe` HaskellName "Tree"
+            entityHaskell `shouldBe` EntityNameHS "Tree"
         it "has the right DB name" $ do
-            entityDB `shouldBe` DBName "trees"
+            entityDB `shouldBe` EntityNameDB "trees"
 
     describe "foreign ref" $ do
         let [ForeignDef{..}] = entityForeigns (entityDef (Proxy :: Proxy Tree))
         it "has the right haskell name" $ do
             foreignRefTableHaskell `shouldBe`
-                HaskellName "Tree"
+                EntityNameHS "Tree"
         it "has the right db name" $ do
             foreignRefTableDBName `shouldBe`
-                DBName "trees"
+                EntityNameDB "trees"
         it "has the right constraint name" $ do
             foreignConstraintNameHaskell `shouldBe`
-                HaskellName "fkparent"
+                ConstraintNameHS "fkparent"
         it "has the right DB constraint name" $ do
             foreignConstraintNameDBName `shouldBe`
-                DBName "treesfkparent"
+                ConstraintNameDB "treesfkparent"
         it "has the right fields" $ do
             foreignFields `shouldBe`
-                [ ( (HaskellName "parent", DBName "parent")
-                  , (HaskellName "name", DBName "name")
+                [ ( (FieldNameHS "parent", FieldNameDB "parent")
+                  , (FieldNameHS "name", FieldNameDB "name")
                   )
                 ]
