While debugging a query that unexpectedly returned an empty list, I realized that I wrote something silly:
fetchDim cId = runDb . select . from $ \dim -> do
where_ dim ^. DimensionIsRowKey ==. val True
return dim
... because you can append == True
to any Boolean value. Replacing it with the following unexpectedly solved my problem and the result wasn't an empty list anymore.
fetchDim cId = runDb . select . from $ \dim -> do
where_ dim ^. DimensionIsRowKey
return dim
Anyone can enlighten me about the actual difference between the two? Why would there be any?
EDIT: The database backend is sqlite.