Reputation: 1322
I'm performing a join in slick like so:
val query = for {
o <- Orders if o.id === order_id
p <- o.part_key
} yield (o,p)
query.list
which creates the following error message:
value list is not a member of org.scalaquery.ql.Query[(code.model.Orders.type, code.model.Parts.type)]
If I just return an Order or Part the query works fine:
val query = for {
o <- Orders if o.id === order_id
p <- o.part_key
} yield o
query.list
How can I return a list of tuple from a slick join query? Why am I getting the error message above?
Upvotes: 0
Views: 1475
Reputation: 1354
I think that the best way for you to return a tuple in the query is to use:
val list = (for {
o <- Orders if o.id === order_id
p <- o.part_key
} yield o ~ p).list
Upvotes: 0