playframework/Play20 — comment on commit f35fd305d98038ab0fe3f8076368ee7f8d90015b
File:  line 0
By sadache:

try (User.single ~ Permission.single *).map(_.groupBy(_._1))

On Thu, Jan 5, 2012 at 10:28 PM, recalcitrant <
reply@reply.github.com
> wrote:

> I have 2 tables user and permission. A user may have more than one
> permission so I came up with this:
>
> select * from user u
> join permission p on u.permission_id = p.id
>
> Now I want to retreive a User + List[Permission]
>
> with the user being of type:
>
> case class User(id: Pk[Long], Seq[Permission])
>
> User.single ~ ( Permission.single * )
>
> The compiler throws this error:
> type mismatch; found : anorm.ResultSetParser[List[models.auth.Permission]]
> required: anorm.RowParser[?]
>
> This had worked before the refactoring, now it does not anymore.
>
> Please also see my post here:
>
> http://groups.google.com/group/play-framework/browse_thread/thread/ca758fa370a5fc1f
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/playframework/Play20/commit/f35fd305d98038ab0fe3f8076368ee7f8d90015b#commitcomment-841760
>

--
www.sadekdrobi.com
ʎdoɹʇuǝ