I have a problem when it comes on compiling my code on esqueleto. For some reason my IDE which is fpcomplete says that there is now an error. But, when I build it it says the My ModelId is unknown.
Here is my code:
qryStrainsList :: SqlBackend -> IO [RawWeedsInfo]
qryStrainsList backend = (flip runReaderT) backend
$ select
$ from $ \(strains `LeftOuterJoin` strainsInfo) -> do
on $ (strains ^. StrainsId) ==. strainsInfo ^. StrainsAdditionalInformationStrainId
return ( strains ^. StrainsId
, strains ^. StrainsName
, strains ^. StrainsStrainType
, strains ^. StrainsDescription
, strainsInfo ^. StrainsAdditionalInformationIncludeType
, strainsInfo ^. StrainsAdditionalInformationExcludeType
, strainsInfo ^. StrainsAdditionalInformationSymptoms
, strainsInfo ^. StrainsAdditionalInformationConditions
, strains ^. StrainsFlavor
, strains ^. StrainsThcLevel
, strains ^. StrainsCbdLevel
, strains ^. StrainsPhotoPeriod
, strains ^. StrainsBreeders
)
The error message is this:
The code threw an exception :
IOException: user error (Postgresql.withStmt':
bad result status FatalError (
("PGRES_FATAL_ERROR","ERROR:
zero-length delimited identifier at or near \"\"\"\"\nLINE
1: SELECT \"strains\".\"\", \"strains\".\"name\", \"strains\".\"strain_typ...\n ^\n")))
Maybe this will also help: I'm using FpComplete as an IDE with Esqueleto 2.0.1 (This was the version supported by the IDE, I think.)
Thanks.