diff --git a/src/Database/Esqueleto/Internal/Internal.hs b/src/Database/Esqueleto/Internal/Internal.hs index a1e519737..8b1efee99 100644 --- a/src/Database/Esqueleto/Internal/Internal.hs +++ b/src/Database/Esqueleto/Internal/Internal.hs @@ -590,10 +590,8 @@ ent ^. field ed = entityDef $ getEntityVal (Proxy :: Proxy (SqlExpr (Entity val))) viewFieldBuilder :: SqlExpr (Entity val) -> IdentInfo -> FieldDef -> TLB.Builder -viewFieldBuilder (ERaw m f) info fieldDef - | Just alias <- sqlExprMetaAlias m = - fst (f Never info) <> ("." <> useIdent info (aliasedEntityColumnIdent alias fieldDef)) - | otherwise = sourceIdent info <> "." <> fieldIdent +viewFieldBuilder (ERaw m f) info fieldDef = + sourceIdent info <> "." <> fieldIdent where sourceIdent = fst <$> f Never fieldIdent