Closed odwrotnie closed 10 years ago
The Entity (TreeNode extends Entity):
abstract class Action[T](var name: String)
extends TreeNode[Action[_]]
with Whose
with Logger {
The Query:
def byUser(user: User) = query {
(action: Action[_]) =>
where(action.owner :== user)
.select(action)
.orderBy(action.created)
}
As discussed via Skype, it is necessary to specify the Action generic parameter, since the scala type inference can handle this pattern of usage.
You can't create query with generic Entity, for example
abstract class Action[T](var name: String) extends Entity