2017-07-13 29 views
2

下面是在models文件耶索德數據庫永久記錄訪問

UserSetting 
    source ArticleSourceId 
    minimumShouldMatch Int 
    articleLength Int 
    userId UserId 
    deriving Show 

在我的處理程序,我發現我不能對實體值vVal例如source使用。

(v:_) <- selectList [UserSettingUserId ==. asUd] [LimitTo 1] 
    let vVal = source $ entityVal v 
    let vId = entityKey v 

錯誤消息Variable not in scope: source :: UserSetting -> Integer

回答

3

這將工作:

let vVal = userSettingSource $ entityVal v