5
我想向我的用户模型中添加一个属性,该属性返回Project表中具有该用户的用户标识的行数。如何在Lift中计算行(Scala的Web框架)
因此,像这样......
def numProjects = {
/* somehow get count from Project table
The straight sql would be:
SELECT COUNT(*) FROM projects WHERE userId = <the current user>
*/
}
谢谢!今天晚些时候会试用。 – joe 2008-09-23 14:19:30