Limitations

A query that returns a primitive type or a Tuple of primitive types (ex.: Query[Int], Query[Int,String]) can not be used as a subquery

Nesting of such queries will result in an exception being thrown at definition time with this error message :

Sub query returns a primitive type or a Tuple of primitive type, and therefore is not useable as a subquery in a from or join clause

The following queries cannot be used as subqueries, except in an in clause :

Solution : Return the row object (the instance of A in table[A])

+, -, * and / operators can cause an ambiguity in PrimitiveTypeMode