I use slick 2.0.2,want just simple filter or use where sub-statement:
val subjectdata = TableQuery[SubjectTable]
...
subjectdata.where(i=>(
i.id===id && i.userId===rs.user.get.identityId.userId)).list()
and get error:
[error] G:\testprojects\slickplay\app\controllers\ShopController.scala:89: Cannot perform option-mapped operation
[error] with type: (Long, String) => R
[error] for base type: (Long, Long) => Boolean
[error] subjectdata.where(i=>(
i.id===id && i.userId===rs.user.get.identityId
.userId)).list()
[error]
^
In slick 1.0.1 I can do:
val results = Query(TableClass)
.filter(r => r.isNull || r.expires > new Timestamp(DateTime.now().getMillis()))
.list
I want do similar staff on TableQuery or Query in slick2, How to do it?